Skip to contentSkip to conversation

ARM: boards: sama5d4 xplained: Use proper header for image start

PATCH Applied Alexander Shiyan 2 participants 2 messages Jun 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: boards: sama5d4 xplained: Use proper header for image start

Switch to using the SAMA5D4-specific entry function and barebox header instead of the generic ARM entry points. This aligns the board with standard AT91 bootstrap practices.
The board is already marked BROKEN, so this refactoring won't cause regressions but improves code consistency with other AT91 boards.

---
 arch/arm/boards/sama5d4_xplained/lowlevel.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
arch/arm/boards/sama5d4_xplained/lowlevel.c +4 -12
index 183bd9c5a9..38dc07a973 100644
@@ -4,20 +4,12 @@
  * Under GPLv2
  */
 
-#include <common.h>
-#include <init.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/ddramc.h>
 
-#include <asm/barebox-arm-head.h>
-#include <asm/barebox-arm.h>
-
-#include <mach/at91/at91_ddrsdrc.h>
-#include <mach/at91/hardware.h>
-
-void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
+SAMA5D4_ENTRY_FUNCTION(start_sama5d4_xplained, r4)
 {
 	arm_cpu_lowlevel_init();
 
-	arm_setup_stack(SAMA5D4_SRAM_BASE + SAMA5D4_SRAM_SIZE);
-
-	barebox_arm_entry(SAMA5_DDRCS, at91sama5d4_get_ddram_size(), NULL);
+	sama5d4_barebox_entry(r4, NULL);
 }
Signature · 1 line
2.39.1
Applied
#1 lore raw
Quoted 8 lines · Alexander Shiyan

Switch to using the SAMA5D4-specific entry function and barebox header instead of the generic ARM entry points. This aligns the board with standard AT91 bootstrap practices.
The board is already marked BROKEN, so this refactoring won't cause regressions but improves code consistency with other AT91 boards.

[...]

Applied, thanks!

[1/1] ARM: boards: sama5d4 xplained: Use proper header for image start
https://git.pengutronix.de/cgit/barebox/commit/?id=09a41f8d2ac8 (link may not be stable)

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>