From patchwork Sat Apr 18 06:07:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1272567 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=l0lJ2kBt; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4942db0VLHz9sP7 for ; Sat, 18 Apr 2020 16:10:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 138DA812A9; Sat, 18 Apr 2020 08:10:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="l0lJ2kBt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F29EB81756; Sat, 18 Apr 2020 08:10:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 55AC081205 for ; Sat, 18 Apr 2020 08:10:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=370d05252=atish.patra@wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1587190223; x=1618726223; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TuJLDsEJ5umbGoSp5zsEepFJlliBN6DbSa8E/auIHyA=; b=l0lJ2kBtQlaG2+S/+jw3VlI2Yr1sbyWCx49yU5wxSL/pfxLHm50QOb73 uXSdlwCzx6VK9RUqC98fJicGGkC0NEHi7Fpl3fW3ro+eAuGSQe6jQ8qfA 2fx2qt55ys3BY37l5y1zhFJwBwAwA7poKl5ww7QqAhQR/FS/KLgBvIdBK PAYIxn/OOQtk7sm8PLPXu5ut9XB/WbftZeW3mBTZTV752dIcETtRCJSxf h3hekoTgVzCtPc3Nst07y6/ugo40IuhsuCUkTsRp/RogC11QamMMMitXz SrdI1dcN2sAMKv9QxlPWHiqEPMCwReZWwG/K6mujewdX12inIPA6yI8mz Q==; IronPort-SDR: cDB3TBwmmBHF7EQlSDE64sFin2afxMygOBal2kqoHrKDrxJ+lx7ScxnncB4O4fRB07FCGGDzro zeFe7Jh7Ro3DmBRFbktz0zECAsPDEbdnZsLqxKjUSDKXxzXU/032rEevUXUHr+aLLjwI3vsIKr Sup4SeW5bw79nhGxFS79dP9fcGDMDoSRrkJ8SvFEAhofm4C74Xui7uPGQavowRkLi8WLssIy67 j5ztnLZ72fzY3Fi+OZxnTeDpibh9Lb+CuOyUZyYgr/2q4sq8DEA+nzz1seSSwFopjQ5IuhmKxs MNM= X-IronPort-AV: E=Sophos;i="5.72,397,1580745600"; d="scan'208";a="139952077" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Apr 2020 14:10:20 +0800 IronPort-SDR: KEiQxVhfl6izL6j7UrDt3z5gQ1LDmvZa8dka3KDt04Y6cFJSxLylOX9A9Btmp4YPQS+X/gYivV CNsyILrYgRdRgKGLPhbZwLqyqts1mQItU= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2020 23:00:44 -0700 IronPort-SDR: BoH3aRuofqRITFyLnbOqQf5GcBXT71+QZQZCa6+xJ6Y87gyxIBHKZEJftYOSnMnBnem++GtGME BaycsSM/CqOA== WDCIronportException: Internal Received: from 5s19j72.ad.shared (HELO yoda.hgst.com) ([10.86.56.13]) by uls-op-cesaip01.wdc.com with ESMTP; 17 Apr 2020 23:10:18 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Anup Patel , Bin Meng , Lukas Auer , Heinrich Schuchardt , agraf@csgraf.de, ard.biesheuvel@linaro.org, Marcus Comstedt , Paul Walmsley , Rick Chen , palmer@dabbelt.com Subject: [RESEND PATCH v5 4/6] riscv: Setup reserved-memory node for FU540 Date: Fri, 17 Apr 2020 23:07:56 -0700 Message-Id: <20200418060758.4839-5-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200418060758.4839-1-atish.patra@wdc.com> References: <20200418060758.4839-1-atish.patra@wdc.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean FU540 uses OF_SEPARATE instead of OF_PRIOR. Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. Signed-off-by: Atish Patra Reviewed-by: Bin Meng --- arch/riscv/lib/fdt_fixup.c | 15 +++++++++++++++ configs/sifive_fu540_defconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 1fce41490973..af12e484db9b 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -100,3 +100,18 @@ int riscv_board_reserved_mem_fixup(void *fdt) return 0; } + +#ifdef CONFIG_OF_BOARD_FIXUP +int board_fix_fdt(void *fdt) +{ + int err; + + err = riscv_board_reserved_mem_fixup(fdt); + if (err < 0) { + printf("failed to fixup DT for reserved memory: %d\n", err); + return err; + } + + return 0; +} +#endif diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig index 6d61e6c960ee..8fb3794cd578 100644 --- a/configs/sifive_fu540_defconfig +++ b/configs/sifive_fu540_defconfig @@ -12,3 +12,4 @@ CONFIG_DISPLAY_BOARDINFO=y CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM_MTD=y +CONFIG_OF_BOARD_FIXUP=y