[{"id":3673523,"web_url":"http://patchwork.ozlabs.org/comment/3673523/","msgid":"<b4015957-76b8-4531-b694-cae143a65f49@mailbox.org>","list_archive_url":null,"date":"2026-04-05T03:59:52","subject":"Re: [PATCH v1 2/4] common: move ram_base calculation to independent\n INITCALL()","submitter":{"id":85664,"url":"http://patchwork.ozlabs.org/api/people/85664/","name":"Marek Vasut","email":"marek.vasut@mailbox.org"},"content":"On 4/3/26 11:01 AM, Ilias Apalodimas wrote:\n> Currently, ram_base is calculated within setup_dest_addr().\n> However, upcoming patches that enable U-Boot relocation to the highest\n> DRAM bank require ram_base to be initialized earlier.\n> \n> The default dram_init_banksize() definition relies on ram_base\n> to calculate the start of the first bank. But following patches\n> will move that function to execute immediately before setup_dest_addr().\n> \n> So let's split the ram_base initialization in its own INITCALL.\n> \n> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>\n> ---\n>   common/board_f.c | 12 +++++++++---\n>   1 file changed, 9 insertions(+), 3 deletions(-)\n> \n> diff --git a/common/board_f.c b/common/board_f.c\n> index 91c569da9682..7df92281c35a 100644\n> --- a/common/board_f.c\n> +++ b/common/board_f.c\n> @@ -329,6 +329,14 @@ __weak int arch_setup_dest_addr(void)\n>   \treturn 0;\n>   }\n>   \n> +static int setup_ram_base(void)\n> +{\n> +#ifdef CFG_SYS_SDRAM_BASE\n> +\tgd->ram_base = CFG_SYS_SDRAM_BASE;\n\nWould it make sense to reset the variable to 0 in case \nCFG_SYS_SDRAM_BASE is not defined ?\n\nOr better yet, how about moving CFG_SYS_SDRAM_BASE to Kconfig with \ndefault value 0 ?","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256\n header.s=mail20150812 header.b=nVNP1pxr;\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.a=rsa-sha256 header.s=mail20150812 header.b=HrNSn5J0;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.b=\"nVNP1pxr\";\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.b=\"HrNSn5J0\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org","phobos.denx.de;\n spf=pass smtp.mailfrom=marek.vasut@mailbox.org"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpKMD6plcz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 14:32:56 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id F142B807C0;\n\tSun,  5 Apr 2026 06:32:48 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id BF3E683C5E; Sun,  5 Apr 2026 06:32:47 +0200 (CEST)","from mout-p-101.mailbox.org (mout-p-101.mailbox.org\n [IPv6:2001:67c:2050:0:465::101])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id BB53880433\n for <u-boot@lists.denx.de>; Sun,  5 Apr 2026 06:32:45 +0200 (CEST)","from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4fpKM11DJpz9tCY;\n Sun,  5 Apr 2026 06:32:45 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1775363565;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=fcispgOr4nkenO21NUWB+uvdXKKy1jFEdfaL0e1a4k8=;\n b=nVNP1pxrrpxhimxHi9y1X8pa7uCJ4lOeBC/ZTNtxBWKSZcf87+9L9itNYK3iEdfS43xmAd\n DbACyuwmTMPoVdrx5ydS6GC7ygCRoiDdcsBWVNOYsqcETHy7tIMCx9YedRZGOlTEs+pidP\n 4hFYAsg98lu7SeHz9ZEZQAf3fhjxVjrd+5L3v85GnfVkDA8p8bUYeof8BmkcjXGnUvws17\n IxTl9EOezTzf1HAnXSW3I5lPhs2L2UtCqBfIXdN+nkX9WHAyZvFJ6Hn1G2h/aecD0LVf2i\n NWA3LPttOOVrih60i9SsXyWZjilCGhoDqc6bvi/dTbGKbcbEqPupJKIaT8huGg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1775363563;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=fcispgOr4nkenO21NUWB+uvdXKKy1jFEdfaL0e1a4k8=;\n b=HrNSn5J00pbvm1wT/Mrb4bBiauyisfMF0MF5uVwCC0rB24nJKu2tf4OnEYRekihGR3ZU2E\n jSR5gTUu/P3xZK5cOdyaDhXZA8k9pwydp95kDhjqPNkuC7ryeozkIwU73jki9HmWAzUXT/\n Q4U5ku19vl8emy1JcbEBTqdnkSega4yhQgmtlY3NTqqoYRDqCYTkL+j0PsbepUnskcXTae\n 83iNr7fl6qZO/5qA1TDc8r2FRfZUxCLsG0VxwjdrryLhh5O8PyCzBzv6bj5c/RhrYlAK1p\n qA0N01Dkruz2FciSNkAqDQymzP8IEvGrqxlF0q0awzIFu2OeN1JW2jjEbAbhfA=="],"Message-ID":"<b4015957-76b8-4531-b694-cae143a65f49@mailbox.org>","Date":"Sun, 5 Apr 2026 05:59:52 +0200","MIME-Version":"1.0","Subject":"Re: [PATCH v1 2/4] common: move ram_base calculation to independent\n INITCALL()","To":"Ilias Apalodimas <ilias.apalodimas@linaro.org>, trini@konsulko.com","Cc":"marek.vasut+renesas@mailbox.org, jonas@kwiboo.se, anshuld@ti.com,\n sjg@chromium.org, u-boot@lists.denx.de","References":"<20260403090109.3564638-1-ilias.apalodimas@linaro.org>\n <20260403090109.3564638-3-ilias.apalodimas@linaro.org>","Content-Language":"en-US","From":"Marek Vasut <marek.vasut@mailbox.org>","In-Reply-To":"<20260403090109.3564638-3-ilias.apalodimas@linaro.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-MBO-RS-META":"e959sdc6kermaobt6n6g7344bnksn1pq","X-MBO-RS-ID":"c90b0738cfa203862ef","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]