Skip to content

Commit 25d1163

Browse files
committed
Merge tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu into fixes
mvebu fixes for v3.16 (round #2) - mvebu - Fix PCIe deadlock now that SMP is enabled - Fix cpuidle for big-endian systems * tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu: ARM: mvebu: fix cpuidle implementation to work on big-endian systems ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup ARM: mvebu: move Armada 375 external abort logic as a quirk Signed-off-by: Olof Johansson <[email protected]>
2 parents d767af5 + 6509dc7 commit 25d1163

File tree

4 files changed

+47
-18
lines changed

4 files changed

+47
-18
lines changed

arch/arm/mach-mvebu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CFLAGS_pmsu.o := -march=armv7-a
77
obj-y += system-controller.o mvebu-soc-id.o
88

99
ifeq ($(CONFIG_MACH_MVEBU_V7),y)
10-
obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o
10+
obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o
1111
obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
1212
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
1313
endif

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

Lines changed: 19 additions & 10 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,17 +72,23 @@ 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()));
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
}
@@ -185,7 +194,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
185194
.l2c_aux_mask = ~0,
186195
.smp = smp_ops(armada_xp_smp_ops),
187196
.init_machine = mvebu_dt_init,
188-
.init_time = mvebu_timer_and_clk_init,
197+
.init_irq = mvebu_init_irq,
189198
.restart = mvebu_restart,
190199
.dt_compat = armada_370_xp_dt_compat,
191200
MACHINE_END
@@ -198,7 +207,7 @@ static const char * const armada_375_dt_compat[] = {
198207
DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
199208
.l2c_aux_val = 0,
200209
.l2c_aux_mask = ~0,
201-
.init_time = mvebu_timer_and_clk_init,
210+
.init_irq = mvebu_init_irq,
202211
.init_machine = mvebu_dt_init,
203212
.restart = mvebu_restart,
204213
.dt_compat = armada_375_dt_compat,
@@ -213,7 +222,7 @@ static const char * const armada_38x_dt_compat[] = {
213222
DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
214223
.l2c_aux_val = 0,
215224
.l2c_aux_mask = ~0,
216-
.init_time = mvebu_timer_and_clk_init,
225+
.init_irq = mvebu_init_irq,
217226
.restart = mvebu_restart,
218227
.dt_compat = armada_38x_dt_compat,
219228
MACHINE_END

arch/arm/mach-mvebu/pmsu.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ static void __iomem *pmsu_mp_base;
6666
extern void ll_disable_coherency(void);
6767
extern void ll_enable_coherency(void);
6868

69+
extern void armada_370_xp_cpu_resume(void);
70+
6971
static struct platform_device armada_xp_cpuidle_device = {
7072
.name = "cpuidle-armada-370-xp",
7173
};
@@ -140,13 +142,6 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)
140142
writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL);
141143
}
142144

143-
static void armada_370_xp_cpu_resume(void)
144-
{
145-
asm volatile("bl ll_add_cpu_to_smp_group\n\t"
146-
"bl ll_enable_coherency\n\t"
147-
"b cpu_resume\n\t");
148-
}
149-
150145
/* No locking is needed because we only access per-CPU registers */
151146
void armada_370_xp_pmsu_idle_prepare(bool deepidle)
152147
{

arch/arm/mach-mvebu/pmsu_ll.S

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (C) 2014 Marvell
3+
*
4+
* Thomas Petazzoni <[email protected]>
5+
* Gregory Clement <[email protected]>
6+
*
7+
* This file is licensed under the terms of the GNU General Public
8+
* License version 2. This program is licensed "as is" without any
9+
* warranty of any kind, whether express or implied.
10+
*/
11+
12+
#include <linux/linkage.h>
13+
#include <asm/assembler.h>
14+
15+
/*
16+
* This is the entry point through which CPUs exiting cpuidle deep
17+
* idle state are going.
18+
*/
19+
ENTRY(armada_370_xp_cpu_resume)
20+
ARM_BE8(setend be ) @ go BE8 if entered LE
21+
bl ll_add_cpu_to_smp_group
22+
bl ll_enable_coherency
23+
b cpu_resume
24+
ENDPROC(armada_370_xp_cpu_resume)
25+

0 commit comments

Comments
 (0)