From patchwork Tue Apr 21 18:15:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1274461 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=rcho6yQ9; 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 496BbX1B9Nz9sSJ for ; Wed, 22 Apr 2020 04:16:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0EEE181C66; Tue, 21 Apr 2020 20:16:10 +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="rcho6yQ9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 217C981C43; Tue, 21 Apr 2020 20:15:42 +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,T_SPF_HELO_TEMPERROR,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) (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 4C83D81A07 for ; Tue, 21 Apr 2020 20:15:19 +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=37371f929=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=1587492923; x=1619028923; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H6fJwH2TDQYP6zTX7vhbtvhRfpkiz6uvwvp3kEFf+04=; b=rcho6yQ9qe0QRKE5KsVtiOf+W0h6B+ftKXINvVOiO1noDvgmQnB99j79 IGPqtAM+wKUaIpse+sjtH1O01esFwTc3zp1TIyjSJUa2RMlfj3WNbCBSb QGiUCeDyyq835QnOmjhK+PXmaFo5HEZRG/ktL4YDXRsXvc4mqwiMt1G8w 5b7wm3CB9gv58arzC3aerjzSIGUsAmXvuLtEeAn9M0NpRQ7cVOT4w13rG LC1TOWi6ac4nMeqT2aKCQrJgh4Q7K1Zhb2yRUZX39bUB8qtbE4YeZT7ua Nt/rqBk355YFx1AS8dDfNWRvOGdSAi7nmPX903MsqYj7ajUHEXqNL6Vmn g==; IronPort-SDR: sLIOsDUK0M72A1l9bwZPfHk+PAu8xGzlsn5g79B30gbFNtjxLOR6VKR5HT365+neM/jgQtrwSS iPH+UGNAGOdPdh2nLfHGZa7HUdPWq3lny5ZNu72lA/cFmI3cBQ/nEVkb3EpLcflQNy2cz1qIDq MvbY+96NUu2Bnz/YfinfnqeZSAuGzJJj9cRR/U8NjgikRd44B8gSFe/QANzNUYlOHRts4JNgma +C8XCalWARXoDXEvPl4WoXlu412+CrGDrGAwxWqRwLg+B7kzhjqy131Duq/K+jOD/zWHCpMWGD Ukg= X-IronPort-AV: E=Sophos;i="5.72,411,1580745600"; d="scan'208";a="135816951" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 22 Apr 2020 02:15:15 +0800 IronPort-SDR: wHseXsDGdNYJcmvfptkIRudpMkqkDOfRrpkR60pF48xf51CeXz5NBeHdt4HU+xcHQjCh4mTwk3 S1aApbiGnnPNV310ZUCDisN+l8ydnV3ms= 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; 21 Apr 2020 11:05:34 -0700 IronPort-SDR: S7zuC0lN9Ty2HlSru1PTrKDEgvc+i7Y5D6zMpr5h68PQaHJ1/r/yWoS0Og9AeJs7/SotaHVhFy BRuqNQ7kgAWA== WDCIronportException: Internal Received: from usa001638.ad.shared (HELO yoda.hgst.com) ([10.86.55.248]) by uls-op-cesaip01.wdc.com with ESMTP; 21 Apr 2020 11:15:16 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Bin Meng , Anup Patel , Lukas Auer , Heinrich Schuchardt , Rick Chen , palmer@dabbelt.com Subject: [PATCH v7 4/6] riscv: Setup reserved-memory node for FU540 Date: Tue, 21 Apr 2020 11:15:02 -0700 Message-Id: <20200421181504.415822-5-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200421181504.415822-1-atish.patra@wdc.com> References: <20200421181504.415822-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