[PATCH 3/5] ARM: mvebu: add register remap for mbus ids

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Wed Jul 23 02:28:08 PDT 2014


For each supported MVEBU SoC, add the corresponding remapped registers
to fix them up in provided DTBs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
To: barebox at lists.infradead.org
To: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
---
 arch/arm/mach-mvebu/armada-370-xp.c | 3 +++
 arch/arm/mach-mvebu/dove.c          | 4 ++++
 arch/arm/mach-mvebu/kirkwood.c      | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index e416a3876539..f5ff9640b770 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -18,6 +18,7 @@
 #include <init.h>
 #include <io.h>
 #include <asm/memory.h>
+#include <linux/mbus.h>
 #include <mach/armada-370-xp-regs.h>
 
 static inline void armada_370_xp_memory_find(unsigned long *phys_base,
@@ -53,6 +54,8 @@ static int armada_370_xp_init_soc(void)
 	armada_370_xp_memory_find(&phys_base, &phys_size);
 	arm_add_mem_device("ram0", phys_base, phys_size);
 
+	mvebu_mbus_add_range(0xf0, 0x01, MVEBU_REMAP_INT_REG_BASE);
+
 	return 0;
 }
 core_initcall(armada_370_xp_init_soc);
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index bcbf4b8ad7bd..974f48074150 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -18,6 +18,7 @@
 #include <init.h>
 #include <io.h>
 #include <asm/memory.h>
+#include <linux/mbus.h>
 #include <mach/dove-regs.h>
 
 static inline void dove_remap_mc_regs(void)
@@ -78,6 +79,9 @@ static int dove_init_soc(void)
 	dove_memory_find(&phys_base, &phys_size);
 	arm_add_mem_device("ram0", phys_base, phys_size);
 
+	mvebu_mbus_add_range(0xf0, 0x01, MVEBU_REMAP_INT_REG_BASE);
+	mvebu_mbus_add_range(0xf0, 0x02, DOVE_REMAP_MC_REGS);
+
 	return 0;
 }
 core_initcall(dove_init_soc);
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index fe9ca9cbe4d3..2249b9bfc64b 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -17,6 +17,7 @@
 #include <init.h>
 #include <io.h>
 #include <asm/memory.h>
+#include <linux/mbus.h>
 #include <mach/kirkwood-regs.h>
 
 static inline void kirkwood_memory_find(unsigned long *phys_base,
@@ -52,6 +53,8 @@ static int kirkwood_init_soc(void)
 	kirkwood_memory_find(&phys_base, &phys_size);
 	arm_add_mem_device("ram0", phys_base, phys_size);
 
+	mvebu_mbus_add_range(0xf0, 0x01, MVEBU_REMAP_INT_REG_BASE);
+
 	return 0;
 }
 core_initcall(kirkwood_init_soc);
-- 
2.0.0




More information about the barebox mailing list