From patchwork Sat Mar 14 00:11:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1254738 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=Gc3BD2x9; 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 48fNKv1mkvz9sPJ for ; Sat, 14 Mar 2020 11:12:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 80F0B8155C; Sat, 14 Mar 2020 01:11:59 +0100 (CET) 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="Gc3BD2x9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A82481536; Sat, 14 Mar 2020 01:11:50 +0100 (CET) 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 esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) (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 70F90813CC for ; Sat, 14 Mar 2020 01:11:41 +0100 (CET) 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=33551ae11=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=1584144702; x=1615680702; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fhh3hWeQmSDfvKO3H2a6Lj+gBtOsPtx7IOF1gi8GKGY=; b=Gc3BD2x9DzoZG+1u/atPeiSd7o0Z126Th9J5JrF2KOmXhfHu9NlR9CYx cHhRo0OUfcVh+HebRkx0AFEpUMrdDURRCmI6Pe+edgbouLUEZuEnjdMb0 5lHbfiHatcABJrt3/P2Zk2HHK0JeluGTwZt3Fpa6DhT/5eJV/WNBgr7jc FUOnT0NY8OD+K3Ni4HOP3g6eTklqbBh1DprXGUp579vzDQTtDr6LgSRzA j1z0nxTZGuKEnDtXtYyWQC57BLxw1I8j245/jVIgbq+PonCKe4pEooSWt z89fxGmD/WTzD44UoRYNaDCi6o+seEeV01086xQNXATOE2yAK2OmQ9aUu A==; IronPort-SDR: h+qqE+Y70gqn7mGlbUMRUK7GpCADeJNCpz7USp0L0CfoxtaG3QxMOwEASiX0I3mWsgWzBKVDJ9 /bCfJqeQEVOX7qd7Uhf1SqNh9iUGJph3u4cYZHun6nAYMW5JPhpcjrZc79ONe6SaDQyV2bzDF2 w/s/JZoUCJpNGnR2XLX3SpfmlHYsMQbo7n6vX35WElKQ3jVp8GjX9mtY1g+9YIBQy5F47DMANh 3149u6Esvh9hDXs7kyTBPFq39jF9y1CJRVSACiwPsUkEHXmcxBZn7ZTWzaF9UWdmRflAtCzk90 7+8= X-IronPort-AV: E=Sophos;i="5.70,550,1574092800"; d="scan'208";a="133903983" 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; 14 Mar 2020 08:11:39 +0800 IronPort-SDR: aItezR9GRzQw99q3MT5ENRDd66TtpHbVEf8kbHYOzVts+FYMpYZjXq9roftGMIZCZi434nYf1h nJdthPoh23BusncBunlMZCbm8ZecSpP9ePochPvALPRS1+Hk1NjVKaUAH9Ea37/8yfdO4J7J0Q Ov8PCB+Tma8Bf4lcQmoirDgwm4vcyK16qwGaXbiSaPlW4T9xu8hjcbFpq+bGL/hYAAdkhpxfll oxAgkNawIJSTWVpzvozxnONO9+/yAgFG97UIHyqERS1K2m+dILvHIEE/YqB9oLe++cCaWVe05I 55rU/+ZQA3NyDFFB5lDIdWmm Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2020 17:03:12 -0700 IronPort-SDR: 6bB0jXwop4Qnlj6xgrN/tdKLgZWHYwBA5pl81lONjbMUqtGfBjlST9odSPBFN4acqVtwFvLmqT GkNV+CHkiiPmsspCkK04TbWY/Y1wRQIxHj/i8RHwzEt+LVBB2epvX6gGc4M5/KI13a7gndDtvz 79Gl/l3yp35T9E4SOATxx2CMpfq51YtsdJMpjCgLoOXr4wSXTEAe/3liCMOBpoW2oyl4+KSOWo OIOiWUWN/5xxyagbcSa3b4dCVFYAwSw1/qqSpIKWIFcKqkdgkaDJ1M/AvXbcqEefGEuAY4TKWB AJM= WDCIronportException: Internal Received: from wdapacbjl0003.my.asia.wdc.com (HELO yoda.hgst.com) ([10.86.54.92]) by uls-op-cesaip02.wdc.com with ESMTP; 13 Mar 2020 17:11:38 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Alexander Graf , Anup Patel , Bin Meng , Heinrich Schuchardt , Lukas Auer , Palmer Dabbelt , Rick Chen , abner.chang@hpe.com, daniel.schaefer@hpe.com Subject: [PATCH v2 4/4] riscv: Setup reserved-memory node for FU540 Date: Fri, 13 Mar 2020 17:11:32 -0700 Message-Id: <20200314001132.17393-5-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200314001132.17393-1-atish.patra@wdc.com> References: <20200314001132.17393-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 --- board/sifive/fu540/fu540.c | 15 +++++++++++++++ configs/sifive_fu540_defconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c index 47a20902517c..82b3a9c8e729 100644 --- a/board/sifive/fu540/fu540.c +++ b/board/sifive/fu540/fu540.c @@ -141,6 +141,21 @@ int misc_init_r(void) #endif +#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 + int board_init(void) { /* For now nothing to do here. */ 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