[PATCH v4 5/8] ARM: socfpga: achilles: replace use of magicvalue

Steffen Trumtrar s.trumtrar at pengutronix.de
Mon Aug 1 05:07:05 PDT 2022


Instead of using a magic value in the board code, use the define from
arria10-system-manager.

Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
---
 arch/arm/boards/reflex-achilles/board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/reflex-achilles/board.c b/arch/arm/boards/reflex-achilles/board.c
index 43e3a69be7..0fbb967ff9 100644
--- a/arch/arm/boards/reflex-achilles/board.c
+++ b/arch/arm/boards/reflex-achilles/board.c
@@ -4,6 +4,7 @@
 #include <init.h>
 #include <io.h>
 #include <bbu.h>
+#include <mach/arria10-system-manager.h>
 
 static int achilles_init(void)
 {
@@ -14,7 +15,7 @@ static int achilles_init(void)
 	if (!of_machine_is_compatible("reflex,achilles"))
 		return 0;
 
-	pbl_index = readl(0xFFD06210);
+	pbl_index = readl(ARRIA10_SYSMGR_ROM_INITSWLASTLD);
 
 	pr_debug("Current barebox instance %d\n", pbl_index);
 
-- 
2.30.2




More information about the barebox mailing list