summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-01-31 23:59:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-01 16:08:21 +0100
commitc23d507559f4e7feb1ffaa0d5e732634cf280fea (patch)
treea105602e1aff3944bd8c5107732fd47f6eff2b2b
parent305b65c2f950d4789d7877c6187d083c4d0c148e (diff)
downloadbarebox-c23d507559f4.tar.gz
barebox-c23d507559f4.tar.xz
ARM: socfpga: complete definitions of handoff registers
The four ISWGRP_HANDOFF_* macro definitions expand to undefined macros. In preparation for using one of them, fix them so they expand to the address of the respective handoff register. No functional change as the macros are yet unused. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240131225938.1746123-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--include/mach/socfpga/cyclone5-system-manager.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/mach/socfpga/cyclone5-system-manager.h b/include/mach/socfpga/cyclone5-system-manager.h
index 7cec60937b..341eaaac7e 100644
--- a/include/mach/socfpga/cyclone5-system-manager.h
+++ b/include/mach/socfpga/cyclone5-system-manager.h
@@ -28,10 +28,15 @@ void socfpga_sysmgr_pinmux_init(unsigned long *sys_mgr_init_table, int num);
/* EMAC interface selection */
#define CONFIG_SYSMGR_EMAC_CTRL (CYCLONE5_SYSMGR_ADDRESS + 0x60)
-#define ISWGRP_HANDOFF_AXIBRIDGE SYSMGR_ISWGRP_HANDOFF0
-#define ISWGRP_HANDOFF_L3REMAP SYSMGR_ISWGRP_HANDOFF1
-#define ISWGRP_HANDOFF_FPGAINTF SYSMGR_ISWGRP_HANDOFF2
-#define ISWGRP_HANDOFF_FPGA2SDR SYSMGR_ISWGRP_HANDOFF3
+#define SYSMGR_ISWGRP_HANDOFF 0x80
+
+#define SYSMGR_ISWGRP_HANDOFF_ADDR(i) \
+ IOMEM(CYCLONE5_SYSMGR_ADDRESS + SYSMGR_ISWGRP_HANDOFF + ((i) * sizeof(u32)))
+
+#define ISWGRP_HANDOFF_AXIBRIDGE SYSMGR_ISWGRP_HANDOFF_ADDR(0)
+#define ISWGRP_HANDOFF_L3REMAP SYSMGR_ISWGRP_HANDOFF_ADDR(1)
+#define ISWGRP_HANDOFF_FPGAINTF SYSMGR_ISWGRP_HANDOFF_ADDR(2)
+#define ISWGRP_HANDOFF_FPGA2SDR SYSMGR_ISWGRP_HANDOFF_ADDR(3)
/* pin mux */
#define SYSMGR_PINMUXGRP (CYCLONE5_SYSMGR_ADDRESS + 0x400)