Skip to content

Commit 0117889

Browse files
tpetazzoniJason Cooper
authored andcommitted
ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup
Commit 497a923 ("ARM: mvebu: implement L2/PCIe deadlock workaround") introduced some logic in coherency.c to adjust the PL310 cache controller Device Tree node of Armada 375 and Armada 38x platform to include the 'arm,io-coherent' property if the system is running with hardware I/O coherency enabled. However, with the L2CC driver cleanup done by Russell King, the initialization of the L2CC driver has been moved earlier, and is now part of the init_IRQ() ARM function in arch/arm/kernel/irq.c. Therefore, calling coherency_init() in ->init_time() is now too late, as the Device Tree property gets added too late (after the L2CC driver has been initialized). In order to fix this, this commit removes the ->init_time() callback use in board-v7.c and replaces it with an ->init_irq() callback. We therefore no longer use the default ->init_irq() callback, but we now use the default ->init_time() callback. In this newly introduced ->init_irq() callback, we call irqchip_init() which is the default behavior when ->init_irq() isn't defined, and then do the initialization related to the coherency: SCU, coherency fabric, and mvebu-mbus (which is needed to start secondary CPUs). Signed-off-by: Thomas Petazzoni <[email protected]> Link: https://lkml.kernel.org/r/1402585772-10405-4-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <[email protected]>
1 parent 752ef80 commit 0117889

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/arm/mach-mvebu/board-v7.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/mbus.h>
2424
#include <linux/signal.h>
2525
#include <linux/slab.h>
26+
#include <linux/irqchip.h>
2627
#include <asm/hardware/cache-l2x0.h>
2728
#include <asm/mach/arch.h>
2829
#include <asm/mach/map.h>
@@ -71,10 +72,9 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
7172
return 1;
7273
}
7374

74-
static void __init mvebu_timer_and_clk_init(void)
75+
static void __init mvebu_init_irq(void)
7576
{
76-
of_clk_init(NULL);
77-
clocksource_of_init();
77+
irqchip_init();
7878
mvebu_scu_enable();
7979
coherency_init();
8080
BUG_ON(mvebu_mbus_dt_init(coherency_available()));
@@ -194,7 +194,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
194194
.l2c_aux_mask = ~0,
195195
.smp = smp_ops(armada_xp_smp_ops),
196196
.init_machine = mvebu_dt_init,
197-
.init_time = mvebu_timer_and_clk_init,
197+
.init_irq = mvebu_init_irq,
198198
.restart = mvebu_restart,
199199
.dt_compat = armada_370_xp_dt_compat,
200200
MACHINE_END
@@ -207,7 +207,7 @@ static const char * const armada_375_dt_compat[] = {
207207
DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
208208
.l2c_aux_val = 0,
209209
.l2c_aux_mask = ~0,
210-
.init_time = mvebu_timer_and_clk_init,
210+
.init_irq = mvebu_init_irq,
211211
.init_machine = mvebu_dt_init,
212212
.restart = mvebu_restart,
213213
.dt_compat = armada_375_dt_compat,
@@ -222,7 +222,7 @@ static const char * const armada_38x_dt_compat[] = {
222222
DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
223223
.l2c_aux_val = 0,
224224
.l2c_aux_mask = ~0,
225-
.init_time = mvebu_timer_and_clk_init,
225+
.init_irq = mvebu_init_irq,
226226
.restart = mvebu_restart,
227227
.dt_compat = armada_38x_dt_compat,
228228
MACHINE_END

0 commit comments

Comments
 (0)