aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mvebu/board-v7.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mvebu/board-v7.c')
-rw-r--r--arch/arm/mach-mvebu/board-v7.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 8bb742fdf5ca..b2524d689f21 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -23,6 +23,7 @@
23#include <linux/mbus.h> 23#include <linux/mbus.h>
24#include <linux/signal.h> 24#include <linux/signal.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/irqchip.h>
26#include <asm/hardware/cache-l2x0.h> 27#include <asm/hardware/cache-l2x0.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
@@ -71,17 +72,23 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
71 return 1; 72 return 1;
72} 73}
73 74
74static void __init mvebu_timer_and_clk_init(void) 75static void __init mvebu_init_irq(void)
75{ 76{
76 of_clk_init(NULL); 77 irqchip_init();
77 clocksource_of_init();
78 mvebu_scu_enable(); 78 mvebu_scu_enable();
79 coherency_init(); 79 coherency_init();
80 BUG_ON(mvebu_mbus_dt_init(coherency_available())); 80 BUG_ON(mvebu_mbus_dt_init(coherency_available()));
81}
82
83static void __init external_abort_quirk(void)
84{
85 u32 dev, rev;
81 86
82 if (of_machine_is_compatible("marvell,armada375")) 87 if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV)
83 hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0, 88 return;
84 "imprecise external abort"); 89
90 hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
91 "imprecise external abort");
85} 92}
86 93
87static void __init i2c_quirk(void) 94static void __init i2c_quirk(void)
@@ -169,8 +176,10 @@ static void __init mvebu_dt_init(void)
169{ 176{
170 if (of_machine_is_compatible("plathome,openblocks-ax3-4")) 177 if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
171 i2c_quirk(); 178 i2c_quirk();
172 if (of_machine_is_compatible("marvell,a375-db")) 179 if (of_machine_is_compatible("marvell,a375-db")) {
180 external_abort_quirk();
173 thermal_quirk(); 181 thermal_quirk();
182 }
174 183
175 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 184 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
176} 185}
@@ -185,7 +194,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
185 .l2c_aux_mask = ~0, 194 .l2c_aux_mask = ~0,
186 .smp = smp_ops(armada_xp_smp_ops), 195 .smp = smp_ops(armada_xp_smp_ops),
187 .init_machine = mvebu_dt_init, 196 .init_machine = mvebu_dt_init,
188 .init_time = mvebu_timer_and_clk_init, 197 .init_irq = mvebu_init_irq,
189 .restart = mvebu_restart, 198 .restart = mvebu_restart,
190 .dt_compat = armada_370_xp_dt_compat, 199 .dt_compat = armada_370_xp_dt_compat,
191MACHINE_END 200MACHINE_END
@@ -198,7 +207,7 @@ static const char * const armada_375_dt_compat[] = {
198DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") 207DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
199 .l2c_aux_val = 0, 208 .l2c_aux_val = 0,
200 .l2c_aux_mask = ~0, 209 .l2c_aux_mask = ~0,
201 .init_time = mvebu_timer_and_clk_init, 210 .init_irq = mvebu_init_irq,
202 .init_machine = mvebu_dt_init, 211 .init_machine = mvebu_dt_init,
203 .restart = mvebu_restart, 212 .restart = mvebu_restart,
204 .dt_compat = armada_375_dt_compat, 213 .dt_compat = armada_375_dt_compat,
@@ -213,7 +222,7 @@ static const char * const armada_38x_dt_compat[] = {
213DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") 222DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
214 .l2c_aux_val = 0, 223 .l2c_aux_val = 0,
215 .l2c_aux_mask = ~0, 224 .l2c_aux_mask = ~0,
216 .init_time = mvebu_timer_and_clk_init, 225 .init_irq = mvebu_init_irq,
217 .restart = mvebu_restart, 226 .restart = mvebu_restart,
218 .dt_compat = armada_38x_dt_compat, 227 .dt_compat = armada_38x_dt_compat,
219MACHINE_END 228MACHINE_END