From patchwork Tue Mar 17 21:19:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1256968 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=SZrXu9Jy; 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 48hmLV6ZqHz9sPF for ; Wed, 18 Mar 2020 08:21:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E69E815E4; Tue, 17 Mar 2020 22:20:35 +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="SZrXu9Jy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 979278155C; Tue, 17 Mar 2020 22:20:18 +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 esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) (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 B858981496 for ; Tue, 17 Mar 2020 22:20:09 +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=3382782c6=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=1584480010; x=1616016010; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fhh3hWeQmSDfvKO3H2a6Lj+gBtOsPtx7IOF1gi8GKGY=; b=SZrXu9JyMn/cHZOQQrRlJzqk0iqAEICEgXvMeDuKYA6A/6iWotlX8mny JIsCEAzk3CHQ5OlDICFoNU9uiouS4zH6COf2ze41tZk3MAvwHk6XEMLsg etit/FZWcvvWFfkT/e4NghQB3NWWMaEjO07fWtFr34pdErRS0LCN5EWyg AgZZtQJ4Mb6QmwobxvlaYSzQNyR2CLL/8a6cESAlpLWy9MmtPwCt4heFT afJN1ZjJ4gQTA+EduP1WLlDA4CFDTUO2tnU4gjxQIwd8UOAaNGkGmhn+j J6FSzZNKLZ7sMq9zNcq6m7gE7JgdILg1LW7xhXLkM2OaQ2x8FR4jXsBWN Q==; IronPort-SDR: wXHSeNx6AC48PM7M2Zwhocbng483GiZPVGZFX6IsmcckY8hg58CzULJn8Ucomhc+6vEefNhqds Q9OOmbINR0RTerIO4myyA0S12bbHc3DKNTb7VT6Sypa9NvWKPd3P8YtXtjlH/1oPJDAtVDGLfq EZ2b/y5ZzjLpKStKI3jyCk8eBxbNfzN8Cra6cTjeIpmnb8oqq4LMTp4uWPHmyPEi0L9VLlisvB 0phj3B4JC5HHSgEf55gWk2An6Fk+oZaE3WMiVIqSWU7tktDKhPVz8C5qXWMp8EyHeTwqrh8D6d KKI= X-IronPort-AV: E=Sophos;i="5.70,565,1574092800"; d="scan'208";a="133222682" 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; 18 Mar 2020 05:19:57 +0800 IronPort-SDR: U4NQqyMIiOEvYo46BDS9V9d4QH5eGh7w665ancyq8RiJxCadB9mFUchOz80A+EslU5wZbsIw8D OUTSjQ54UsDYyui+gAXLl5HK4FZC4ZD5ChynFi+EX45vxabbf3W2/yEg6Q91owlZijim4/i+dw nMZdin4jVjiQEE6l5CthVZspC5a+Y9Z3wdIuj8r+evvvjtxuBB0PUApdkS7dUiVnrjogfBJynu BxvNSi6XP7vVz1+cGGnsqU9nv0GX26jCobM5LGDbjiiDm43mG1C4yUcwYlnNb1ee9TiRAouSqo Wo00fOWHwNrjm9Nz6DuMlJ+9 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; 17 Mar 2020 14:11:24 -0700 IronPort-SDR: iM1BlADrC2ZL1n/T0WwtlwZAO8L8rS32T+swK71TRNtehyuxjUEUqC15YHn8P2x68Esw0BJEDo 7Zv6UokJZ29RSBeY+zJZc0KTlfhABnTuvaInK0vKvI2Sig1LSuHAgejrKFHtRGRQokdGIFL9us ZaYPt20BYr6Bo0X31L2Cap5zs7Pu0Z4Nl8RuqRxm5r8D+9aNMytaaFS4Jk6CC2GqZyXyY+2GhA QPlD9vVFc1fr8gLj5B2K6i3i0Fh67gPDVVhLs5F38vSG20A6Zzxvz1DU9rAeZgI50kSG2kphSE +Lo= WDCIronportException: Internal Received: from mccorma-lt.ad.shared (HELO yoda.hgst.com) ([10.86.54.125]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Mar 2020 14:19:56 -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 v3 4/5] riscv: Setup reserved-memory node for FU540 Date: Tue, 17 Mar 2020 14:19:45 -0700 Message-Id: <20200317211946.28062-5-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200317211946.28062-1-atish.patra@wdc.com> References: <20200317211946.28062-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