From patchwork Sat Apr 18 19:32:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1272708 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=85.214.62.61; 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=pRxzCdmA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 494NSL0Rw3z9sRN for ; Sun, 19 Apr 2020 05:34:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 74F7881C81; Sat, 18 Apr 2020 21:33:42 +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="pRxzCdmA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22A2981C7C; Sat, 18 Apr 2020 21:33:15 +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 esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (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 4E8CE81C71 for ; Sat, 18 Apr 2020 21:33:05 +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=1587238385; x=1618774385; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=INqDrVuwYship83XFDgO24F1ldKXKcjB20L27Sgxaz4=; b=pRxzCdmAzfxzg14GvZE1wUMRLlbxO3VpWvNgCoSfpntW5ImeMmh9bgeW FrcwZ8JNWRwSclSpaXqgqaRS926+6CDF18NKeIhpUszBgLdU9Qn+T+KJR Yp+1IY0+T2PWXjFztAkE+l5CJkr4Kdyj5genVihf+YfgPokv2mGHFIPFe J/8bm2bqkrCV8wYkrUPmtKcSI0gFE8Uf3ZtCGFKSHBE3wTatAKm/NTAVQ pxjkX3DuvKc46ah7GsfFII0m8I9cZsVu6h1dDQeK6xySktUyWcHpsgnjO q4ZHTRFTggKLKiO39TBYzkYkm5CfF+T6njSVxUedI9zDk0P8tFH7or3MS Q==; IronPort-SDR: uUUnhURLu0WElDZzWsdCKREepy/8qzNwdxMaAixNvxLkUTR2PeqOmRR2ktTuZYJfAq3OB+ufQF X3cteTMbhyOj+78S5ayNnYTT5X0zgDeMa4VAPdyJ8GweXojVK2+bO/GROkv4cXg1mm+HU0WWiF 0IBiTXmAnodeznP3OOAKpf0QW1XGzhXHENF6TOOv+04k+OOrOiFysBm2DCVZhDizM3vI6u6CbA 1UYhzhe2sBL8Bos5kBS4UdBm1GCz75jVdhJObhYNTsnoAxZNMv0ER9sld+xzseNLmfJdMlpwqR K7M= X-IronPort-AV: E=Sophos;i="5.72,400,1580745600"; d="scan'208";a="244312817" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Apr 2020 03:32:42 +0800 IronPort-SDR: eEx9rDOFkhEB5D0fykpRa1DXB07Igi003Pl/3qm4VFuIM85XySTDJVtalw3qshRWF1S4LqeCZw BMMxSMegKrZ3dexxc7LDjPLow+ascyL0k= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2020 12:23:39 -0700 IronPort-SDR: Y2MJPaLCpVWoW49tcFrta6tvaEk2+84bw48onUSQDYC1T8i6Xo3kG2Z+3fJrwdFyGmiSuzjzL9 QeVQqliKzmAg== WDCIronportException: Internal Received: from cnf007834.ad.shared (HELO yoda.hgst.com) ([10.86.56.8]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Apr 2020 12:32:42 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Bin Meng , Anup Patel , Lukas Auer , Heinrich Schuchardt , agraf@csgraf.de, ard.biesheuvel@linaro.org, Marcus Comstedt , Paul Walmsley , Rick Chen , palmer@dabbelt.com Subject: [PATCH v6 4/6] riscv: Setup reserved-memory node for FU540 Date: Sat, 18 Apr 2020 12:32:26 -0700 Message-Id: <20200418193228.44209-5-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200418193228.44209-1-atish.patra@wdc.com> References: <20200418193228.44209-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_STAGE. Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. Signed-off-by: Atish Patra Reviewed-by: Bin Meng Tested-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..f805aacc7afd 100644 --- a/configs/sifive_fu540_defconfig +++ b/configs/sifive_fu540_defconfig @@ -9,6 +9,7 @@ CONFIG_FIT=y CONFIG_MISC_INIT_R=y CONFIG_DISPLAY_CPUINFO=y CONFIG_DISPLAY_BOARDINFO=y +CONFIG_OF_BOARD_FIXUP=y CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM_MTD=y