[PATCH 4/4] at91: Use proper values of stashed SAMA5D2/3/4 bootsource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux