Skip to content

Commit 752ef80

Browse files
tpetazzoniJason Cooper
authored andcommitted
ARM: mvebu: move Armada 375 external abort logic as a quirk
In preparation to a small re-organization of the initialization sequence in board-v7.c, this commit moves the registration of the custom external abort handler on Armada 375 later in the boot sequence, and makes it more similar to the other quirks that we already have. There is indeed no need to register this abort handler particularly early, it simply needs to be registered before switching to userspace. In addition to this, this commit makes the registration of the custom abort handler conditional on Armada 375 Z1, because Armada 375 A0 and later iterations are not affected by the issue. This commit was tested on both Armada 375 Z1 and Armada 375 A0 platforms. Signed-off-by: Thomas Petazzoni <[email protected]> Link: https://lkml.kernel.org/r/1402585772-10405-3-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <[email protected]>
1 parent 8dbdb8e commit 752ef80

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,17 @@ static void __init mvebu_timer_and_clk_init(void)
7878
mvebu_scu_enable();
7979
coherency_init();
8080
BUG_ON(mvebu_mbus_dt_init(coherency_available()));
81+
}
82+
83+
static void __init external_abort_quirk(void)
84+
{
85+
u32 dev, rev;
8186

82-
if (of_machine_is_compatible("marvell,armada375"))
83-
hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
84-
"imprecise external abort");
87+
if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV)
88+
return;
89+
90+
hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
91+
"imprecise external abort");
8592
}
8693

8794
static void __init i2c_quirk(void)
@@ -169,8 +176,10 @@ static void __init mvebu_dt_init(void)
169176
{
170177
if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
171178
i2c_quirk();
172-
if (of_machine_is_compatible("marvell,a375-db"))
179+
if (of_machine_is_compatible("marvell,a375-db")) {
180+
external_abort_quirk();
173181
thermal_quirk();
182+
}
174183

175184
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
176185
}

0 commit comments

Comments
 (0)