[PATCH] ARM: boards: sama5d4 xplained: Use proper header for image start

Alexander Shiyan eagle.alexander923 at gmail.com
Fri Jun 20 00:41:57 PDT 2025


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.

Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
 arch/arm/boards/sama5d4_xplained/lowlevel.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boards/sama5d4_xplained/lowlevel.c b/arch/arm/boards/sama5d4_xplained/lowlevel.c
index 183bd9c5a9..38dc07a973 100644
--- a/arch/arm/boards/sama5d4_xplained/lowlevel.c
+++ b/arch/arm/boards/sama5d4_xplained/lowlevel.c
@@ -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);
 }
-- 
2.39.1




More information about the barebox mailing list