Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B58F7C352A1 for ; Tue, 6 Dec 2022 15:35:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 37F05853F9; Tue, 6 Dec 2022 16:35:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="iQJ8oQ3J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB5198549D; Tue, 6 Dec 2022 16:35:04 +0100 (CET) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 36F1E85318 for ; Tue, 6 Dec 2022 16:35:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=detlev.casanova@collabora.com Received: from Falcon9.mtl.collabora.ca (mtl.collabora.ca [66.171.169.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 210116602AAA; Tue, 6 Dec 2022 15:35:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1670340901; bh=9KneTmO41nrf+oP2HGo5y//zN15R2Y004VN52ONcCg8=; h=From:To:Cc:Subject:Date:From; b=iQJ8oQ3JSPp7Ad4WI7e+RWeZIhP/8ltpXTI7VO0NTeAtNx6/CzmEBPnIpgYMBIQAf rJr7HOC9ilx8+1eZ0jM4V0H7KPagQjqT7DPqZ0q527aYdST5zVpTsbivWHvI6pQqGi EGOaivMvKhpXiYxppAKZaH9WIR3WUC3nFwQ5kMwB67ilLGXY3jk2SyUTVBC5n8eufQ x7/THXEhx4O6krfiLNVQ8xWr/PvqWxqrPFc4wYWlfBjAGShIZkCOux0Rhi4HaRJNZJ e2mIruY9S1jOTzbN5otkHzR1XWcWNm1rI7atQsyXJiqENy3hUaTLKsi/CGTQRjcmSC oSyRJMbwM1/zg== From: Detlev Casanova To: u-boot@lists.denx.de Cc: Geert Uytterhoeven , Detlev Casanova Subject: [PATCH] renesas: rcar: Apply ATF overlay for reserved-memory Date: Tue, 6 Dec 2022 10:34:47 -0500 Message-Id: <20221206153447.171035-1-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean The function fdtdec_board_setup() is only called by fdtdec_setup() which needs to be called by the board file. This is not the case for the renesas boards so rename the fdtdec_board_setup() function to a local name and call it directly from ft_board_setup(), before cleaning up the memory nodes. Signed-off-by: Detlev Casanova --- board/renesas/rcar-common/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c index daa1beb14f..6eaa0d1a65 100644 --- a/board/renesas/rcar-common/common.c +++ b/board/renesas/rcar-common/common.c @@ -25,14 +25,12 @@ extern u64 rcar_atf_boot_args[]; #define FDT_RPC_PATH "/soc/spi@ee200000" -int fdtdec_board_setup(const void *fdt_blob) +void apply_atf_overlay(void *fdt_blob) { void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]); if (fdt_magic(atf_fdt_blob) == FDT_MAGIC) - fdt_overlay_apply_node((void *)fdt_blob, 0, atf_fdt_blob, 0); - - return 0; + fdt_overlay_apply_node(fdt_blob, 0, atf_fdt_blob, 0); } int dram_init(void) @@ -159,6 +157,7 @@ static void update_rpc_status(void *blob) int ft_board_setup(void *blob, struct bd_info *bd) { + apply_atf_overlay(blob); scrub_duplicate_memory(blob); update_rpc_status(blob); -- 2.38.1