diff options
| author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-09-07 15:58:22 +0530 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 16:07:24 +0200 |
| commit | 13684980f393e9536a4cdf21589b46ecfcb8ba1e (patch) | |
| tree | 6c83e0ebd2c6762a70569d0c876d3fe851c61f18 | |
| parent | adb3fe350d3f51bad704f0e475ac257f47542fb0 (diff) | |
ux500: unlock L2 after second core boot
Unlocking the L2 before the second core is booted up appears to cause
the wake up of the second core to occasionaly fail. Work around this by
unlocking the L2 in init_machine, which is well after the second core is
up.
ST-Ericsson ID: ER273188
Change-Id: Iedc8c799303b204b4b3df65d74603e25efe9df6a
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/5270
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
| -rw-r--r-- | arch/arm/mach-ux500/cpu-db5500.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpu.c | 17 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/include/mach/setup.h | 1 |
4 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 70fa6c0efc9..1a04ca99007 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c @@ -265,6 +265,8 @@ static int usb_db5500_tx_dma_cfg[] = { void __init u5500_init_devices(void) { + ux500_init_devices(); + #ifdef CONFIG_STM_TRACE /* Early init for STM tracing */ /* platform_device_register(&u5500_stm_device); */ diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index ec8aad827d7..e06e400c16a 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -163,6 +163,8 @@ static int usb_db8500_tx_dma_cfg[] = { */ void __init u8500_init_devices(void) { + ux500_init_devices(); + #ifdef CONFIG_STM_TRACE /* Early init for STM tracing */ platform_device_register(&ux500_stm_device); diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index f28f7858040..96c42e06ea4 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -31,6 +31,23 @@ void __iomem *_PRCMU_BASE; static void __iomem *l2x0_base; #endif +void __init ux500_init_devices(void) +{ +#ifdef CONFIG_CACHE_L2X0 + BUG_ON(!l2x0_base); + + /* + * Unlock Data and Instruction Lock if locked. This is done here + * instead of in l2x0_init since doing it there appears to cause the + * second core boot to occasionaly fail. + */ + if (readl_relaxed(l2x0_base + L2X0_LOCKDOWN_WAY_D) & 0xFF) + writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D); + + if (readl_relaxed(l2x0_base + L2X0_LOCKDOWN_WAY_I) & 0xFF) + writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I); +#endif +} static void ux500_restart(char mode, const char *cmd) { diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index c49f55e0be1..cfb37baaa6f 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h @@ -18,6 +18,7 @@ void __init ux500_map_io(void); extern void __init u5500_map_io(void); extern void __init u8500_map_io(void); +extern void __init ux500_init_devices(void); extern void __init u5500_init_devices(void); extern void __init u8500_init_devices(void); |
