aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2014-02-22 14:14:48 -0500
committerJason Cooper <jason@lakedaemon.net>2014-02-22 15:41:24 -0500
commit7f28fd6ebebb70eb2412f2775f2a19e3834601f6 (patch)
tree2ad3ba279b32c6ba1742e8bf31106d28bf43b798
parentdab7dfb6c0e23d5fab56824e40795872c13afc1c (diff)
ARM: kirkwood: ioremap the cpu_config register before using it.
With the move to mach-mvebu and MULTI_V5, the global iomap for all registers will be going away. So explicitly map the CPU configuration register before using it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c22
-rw-r--r--arch/arm/mach-kirkwood/include/mach/bridge-regs.h1
2 files changed, 16 insertions, 7 deletions
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 64151a4a378f..d5d8f4996722 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -191,15 +191,23 @@ eth_fixup_skip:
191 } 191 }
192} 192}
193 193
194/*
195 * Disable propagation of mbus errors to the CPU local bus, as this
196 * causes mbus errors (which can occur for example for PCI aborts) to
197 * throw CPU aborts, which we're not set up to deal with.
198 */
199static void __init kirkwood_disable_mbus_error_propagation(void)
200{
201 void __iomem *cpu_config;
202
203 cpu_config = ioremap(CPU_CONFIG_PHYS, 4);
204 writel(readl(cpu_config) & ~CPU_CONFIG_ERROR_PROP, cpu_config);
205 iounmap(cpu_config);
206}
207
194static void __init kirkwood_dt_init(void) 208static void __init kirkwood_dt_init(void)
195{ 209{
196 /* 210 kirkwood_disable_mbus_error_propagation();
197 * Disable propagation of mbus errors to the CPU local bus,
198 * as this causes mbus errors (which can occur for example
199 * for PCI aborts) to throw CPU aborts, which we're not set
200 * up to deal with.
201 */
202 writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
203 211
204 BUG_ON(mvebu_mbus_dt_init()); 212 BUG_ON(mvebu_mbus_dt_init());
205 213
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index 8b9d1c9ff199..2bd12fde1781 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -14,6 +14,7 @@
14#include <mach/kirkwood.h> 14#include <mach/kirkwood.h>
15 15
16#define CPU_CONFIG (BRIDGE_VIRT_BASE + 0x0100) 16#define CPU_CONFIG (BRIDGE_VIRT_BASE + 0x0100)
17#define CPU_CONFIG_PHYS (BRIDGE_PHYS_BASE + 0x0100)
17#define CPU_CONFIG_ERROR_PROP 0x00000004 18#define CPU_CONFIG_ERROR_PROP 0x00000004
18 19
19#define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) 20#define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104)