From mboxrd@z Thu Jan 1 00:00:00 1970 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 3552AC6FD1C for ; Thu, 23 Mar 2023 15:29:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 72DD285D4A; Thu, 23 Mar 2023 16:29:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine 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="YF9TWju2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2A9E485D38; Thu, 23 Mar 2023 16:29:26 +0100 (CET) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (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 C967E85A6E for ; Thu, 23 Mar 2023 16:29:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=detlev.casanova@collabora.com Received: from arisu.localnet (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 F225966030F9; Thu, 23 Mar 2023 15:29:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679585363; bh=vUoqD8el3vEuMMtD5ONeEOf7p73zFjCbcj2CYV3D2q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YF9TWju2jhuU9AhOuWpAR8FWiM/OKSxYwJ/i88pLysHs9wAGGTNAYGHzRKh5BVabg J0TEfUACjD3L44mBajMszSIAnTeMNZk4FQg5X6MX6Yi+bp6qHIMRNvhjKlwxIeaeSt D0ayJjxQly+bhOPDj9fMVcu+QJsPdveTdT4ofvY/43OKbeOQlNFdkmF4NlNBC/I9k9 BFZv0Ecy0YFI6UMwe2dxHXxgw6YYze9wSlGXWLVDEU2oqvvPWJwXr5e+SPARVWtTPY 59P9o+JQlEGFTrdPfYtIbSOwm1rtZK8TLZrnZHzucCYAGguQCg+CD9xTdyuUI0r7M6 pAsLCe8dcu0Qg== From: Detlev Casanova To: u-boot@lists.denx.de Cc: Geert Uytterhoeven Subject: Re: [PATCH v2] renesas: rcar: Apply ATF overlay for reserved-memory Date: Thu, 23 Mar 2023 11:29:22 -0400 Message-ID: <2012012.1zyvgf563o@arisu> In-Reply-To: <20221206160648.174707-1-detlev.casanova@collabora.com> References: <20221206160648.174707-1-detlev.casanova@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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.8 at phobos.denx.de X-Virus-Status: Clean Hi! ! Just bumping up this patch. On Tuesday, December 6, 2022 11:06:48 A.M. EDT Detlev Casanova wrote: > 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 | 19 +++++++++---------- > 1 file changed, 9 insertions(+), 10 deletions(-) > > diff --git a/board/renesas/rcar-common/common.c > b/board/renesas/rcar-common/common.c index daa1beb14f..c50d09ef8b 100644 > --- a/board/renesas/rcar-common/common.c > +++ b/board/renesas/rcar-common/common.c > @@ -25,16 +25,6 @@ extern u64 rcar_atf_boot_args[]; > > #define FDT_RPC_PATH "/soc/spi@ee200000" > > -int fdtdec_board_setup(const 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; > -} > - > int dram_init(void) > { > return fdtdec_setup_mem_size_base(); > @@ -48,6 +38,14 @@ int dram_init_banksize(void) > } > > #if defined(CONFIG_OF_BOARD_SETUP) > +static 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(fdt_blob, 0, atf_fdt_blob, 0); > +} > + > static int is_mem_overlap(void *blob, int first_mem_node, int > curr_mem_node) { > struct fdt_resource first_mem_res, curr_mem_res; > @@ -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); Regards, Detlev.