mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "open list:BAREBOX" <barebox@lists.infradead.org>
Subject: [PATCH v2 05/12] ARM: Layerscape: ls1046ardb: remove unused variable
Date: Tue, 22 Oct 2024 09:46:29 +0200	[thread overview]
Message-ID: <20241022-arm-layerscape-tfa-v2-5-69ac70ceb0ff@pengutronix.de> (raw)
In-Reply-To: <20241022-arm-layerscape-tfa-v2-0-69ac70ceb0ff@pengutronix.de>

memsize is set with the value returned from fsl_ddr_sdram(), then passed
through r0 to the full barebox binary where it is then finally unused.
Just remove the variable. The real memory amount is hardcoded in the
board code anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/ls1046ardb/lowlevel.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index c2d3a526bc..9c3f1a8375 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -184,16 +184,13 @@ static struct fsl_ddr_info ls1046a_info = {
 	.c = ddrc,
 };
 
-static noinline __noreturn void ls1046ardb_r_entry(unsigned long memsize)
+static noinline __noreturn void ls1046ardb_r_entry(void)
 {
 	unsigned long membase = LS1046A_DDR_SDRAM_BASE;
 	struct pbl_i2c *i2c;
 	int ret;
 
 	if (get_pc() >= membase) {
-		if (memsize + membase >= 0x100000000)
-			memsize = 0x100000000 - membase;
-
 		barebox_arm_entry(membase, 0x80000000 - SZ_64M,
 				  __dtb_z_fsl_ls1046a_rdb_start);
 	}
@@ -209,11 +206,11 @@ static noinline __noreturn void ls1046ardb_r_entry(unsigned long memsize)
 		goto err;
 	}
 
-	memsize = fsl_ddr_sdram(&ls1046a_info, false);
+	fsl_ddr_sdram(&ls1046a_info, false);
 
 	ls1046a_errata_post_ddr();
 
-	ls1046a_esdhc_start_image(memsize, 0, 0);
+	ls1046a_esdhc_start_image(0, 0, 0);
 
 err:
 	pr_err("Booting failed\n");
@@ -228,5 +225,5 @@ __noreturn void ls1046ardb_entry(unsigned long r0, unsigned long r1, unsigned lo
 	relocate_to_current_adr();
 	setup_c();
 
-	ls1046ardb_r_entry(r0);
+	ls1046ardb_r_entry();
 }

-- 
2.39.5




  parent reply	other threads:[~2024-10-22  7:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 02/12] ARM: Layerscape: images: fix variable name Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 03/12] ARM: Layerscape: images: add missing FORCE Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 04/12] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant Sascha Hauer
2024-10-22  7:46 ` Sascha Hauer [this message]
2024-10-22  7:46 ` [PATCH v2 06/12] ARM: Layerscape: remove register arguments Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 07/12] ARM: Layerscape: LS1046a: add TF-A support Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 08/12] ARM: Layerscape: LS1046a-rdb: Switch to " Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 09/12] ARM: Layerscape: TQMLS1046a: " Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 10/12] ARM: Layerscape: LS1046a: remove PPA support Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 11/12] ARM: Layerscape: LS1046a: add PSCI node Sascha Hauer
2024-10-22  7:46 ` [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A Sascha Hauer
2024-10-22  8:16   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241022-arm-layerscape-tfa-v2-5-69ac70ceb0ff@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox