mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 1/4] ARM: at91: sama5d3: pass BootROM r4 on to barebox proper
Date: Fri,  6 Nov 2026 12:13:47 +0100	[thread overview]
Message-ID: <20261106111352.3535034-1-a.fatoum@pengutronix.de> (raw)

From: Ahmad Fatoum <a.fatoum@barebox.org>

The SAMA5D3 xload entry points pass a literal 0 instead of the BootROM's
r4 to sama5d3_atmci_start_image(). This leads to wrong $bootsource
computation.

Fix this by passing r4 through. Tested on a SAMA5D3 Xplained booting
from SD.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/boards/microchip-ksz9477-evb/lowlevel.c | 2 +-
 arch/arm/boards/microchip-sama5d3-eds/lowlevel.c | 2 +-
 arch/arm/boards/sama5d3_xplained/lowlevel.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
index aa2161daeef0..e59578987ba2 100644
--- a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
+++ b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
@@ -44,7 +44,7 @@ SAMA5D3_ENTRY_FUNCTION(start_sama5d3_xplained_ung8071_xload_mmc, r4)
 	if (IS_ENABLED(CONFIG_DEBUG_LL))
 		dbgu_init();
 
-	sama5d3_atmci_start_image(0, MASTER_CLOCK, 0);
+	sama5d3_atmci_start_image(r4, MASTER_CLOCK, 0);
 }
 
 extern char __dtb_z_at91_microchip_ksz9477_evb_start[];
diff --git a/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c b/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c
index 79346a9b6ac1..b05824c7d1b0 100644
--- a/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c
+++ b/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c
@@ -44,7 +44,7 @@ SAMA5D3_ENTRY_FUNCTION(start_microchip_sama5d3_eds_xload_mmc, r4)
 	if (IS_ENABLED(CONFIG_DEBUG_LL))
 		dbgu_init();
 
-	sama5d3_atmci_start_image(0, MASTER_CLOCK, 0);
+	sama5d3_atmci_start_image(r4, MASTER_CLOCK, 0);
 }
 
 extern char __dtb_z_at91_microchip_sama5d3_eds_start[];
diff --git a/arch/arm/boards/sama5d3_xplained/lowlevel.c b/arch/arm/boards/sama5d3_xplained/lowlevel.c
index 2a0fed1141de..c7578e6db18c 100644
--- a/arch/arm/boards/sama5d3_xplained/lowlevel.c
+++ b/arch/arm/boards/sama5d3_xplained/lowlevel.c
@@ -45,7 +45,7 @@ SAMA5D3_ENTRY_FUNCTION(start_sama5d3_xplained_xload_mmc, r4)
 	sama5d3_udelay_init(MASTER_CLOCK);
 	sama5d3_xplained_ddrconf();
 
-	sama5d3_atmci_start_image(0, MASTER_CLOCK, 0);
+	sama5d3_atmci_start_image(r4, MASTER_CLOCK, 0);
 }
 
 extern char __dtb_z_at91_sama5d3_xplained_start[];
-- 
2.47.3




             reply	other threads:[~2026-11-06 11:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 11:13 Ahmad Fatoum [this message]
2026-11-06 11:13 ` [PATCH 2/4] ARM: at91: sama5d3_xplained: drop invalid hostname Ahmad Fatoum
2026-11-06 11:13 ` [PATCH 3/4] pwm: atmel: look up the clock without a name Ahmad Fatoum
2026-11-06 11:13 ` [PATCH 4/4] ARM: at91: sama5d3: Migrate to MFD-based SMC driver Ahmad Fatoum
2026-11-09  9:52 ` [PATCH 1/4] ARM: at91: sama5d3: pass BootROM r4 on to barebox proper Sascha Hauer

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=20261106111352.3535034-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=a.fatoum@barebox.org \
    --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