[PATCH 4/4] at91: Use proper values of stashed SAMA5D2/3/4 bootsource
Alexander Shiyan
eagle.alexander923 at gmail.com
Tue Mar 4 22:21:01 PST 2025
Since the SRAM area varies across different processor variants,
let's make a distinction for stashed bootsource recovery.
Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
arch/arm/mach-at91/sama5_bootsource.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-at91/sama5_bootsource.c b/arch/arm/mach-at91/sama5_bootsource.c
index 4ede256e8f..0d91f5fb5a 100644
--- a/arch/arm/mach-at91/sama5_bootsource.c
+++ b/arch/arm/mach-at91/sama5_bootsource.c
@@ -19,11 +19,15 @@
*/
static int sama5_bootsource_init(void)
{
- if (!of_machine_is_compatible("atmel,sama5"))
+ if (of_machine_is_compatible("atmel,sama5d2"))
+ at91_bootsource = __sama5d2_stashed_bootrom_r4;
+ else if (of_machine_is_compatible("atmel,sama5d3"))
+ at91_bootsource = __sama5d3_stashed_bootrom_r4;
+ else if (of_machine_is_compatible("atmel,sama5d4"))
+ at91_bootsource = __sama5d4_stashed_bootrom_r4;
+ else
return 0;
- at91_bootsource = __sama5d2_stashed_bootrom_r4;
-
if (at91_bootsource)
bootsource_set_raw(sama5_bootsource(at91_bootsource),
sama5_bootsource_instance(at91_bootsource));
--
2.39.1
More information about the barebox
mailing list