aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 19:55:06 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 19:55:06 -0700
commit68e24ba70465b82ad24e0774ceab5360180d4627 (patch)
tree5d2b8e22e556360f353b2d1c73a19aaf6c5becd9 /arch/arm/mach-ux500
parentb4beb4bf9934d151bf4581a54ae028927374cb2a (diff)
parent5725aeae5ff2e39f3815bbef788ee326c9afea2c (diff)
downloadkernel_samsung_smdk4412-68e24ba70465b82ad24e0774ceab5360180d4627.zip
kernel_samsung_smdk4412-68e24ba70465b82ad24e0774ceab5360180d4627.tar.gz
kernel_samsung_smdk4412-68e24ba70465b82ad24e0774ceab5360180d4627.tar.bz2
Merge branch 'next/fixes' of git://git.linaro.org/people/arnd/arm-soc
* 'next/fixes' of git://git.linaro.org/people/arnd/arm-soc: (28 commits) ARM: pxa/cm-x300: properly set bt_reset pin ARM: mmp: rename SHEEVAD to GPLUGD ARM: imx: Fix typo 'MACH_MX31_3DS_MXC_NAND_USE_BBT' ARM: i.MX28: shift frac value in _CLK_SET_RATE plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired ARM: mx5: fix clock usage for suspend ARM: pxa: use correct __iomem annotations ARM: pxa: sharpsl pm needs SPI ARM: pxa: centro and treo680 need palm27x ARM: pxa: make pxafb_smart_*() empty when not enabled ARM: pxa: select POWER_SUPPLY on raumfeld ARM: pxa: pxa95x is incompatible with earlier pxa ARM: pxa: CPU_FREQ_TABLE is needed for CPU_FREQ ARM: pxa: pxa95x/saarb depends on pxa3xx code ARM: pxa: allow selecting just one of TREO680/CENTRO ARM: pxa: export symbols from pxa3xx-ulpi ARM: pxa: make zylonite_pxa*_init declaration match code ARM: pxa/z2: fix building error of pxa27x_cpu_suspend() no longer available ARM: at91: add defconfig for at91sam9g45 family ARM: at91: remove dependency for Atmel PWM driver selector in Kconfig ...
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/cpu.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 1da23bb..8aa104a 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -99,7 +99,27 @@ static void ux500_l2x0_inv_all(void)
ux500_cache_sync();
}
-static int ux500_l2x0_init(void)
+static int __init ux500_l2x0_unlock(void)
+{
+ int i;
+
+ /*
+ * Unlock Data and Instruction Lock if locked. Ux500 U-Boot versions
+ * apparently locks both caches before jumping to the kernel. The
+ * l2x0 core will not touch the unlock registers if the l2x0 is
+ * already enabled, so we do it right here instead. The PL310 has
+ * 8 sets of registers, one per possible CPU.
+ */
+ for (i = 0; i < 8; i++) {
+ writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE +
+ i * L2X0_LOCKDOWN_STRIDE);
+ writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE +
+ i * L2X0_LOCKDOWN_STRIDE);
+ }
+ return 0;
+}
+
+static int __init ux500_l2x0_init(void)
{
if (cpu_is_u5500())
l2x0_base = __io_address(U5500_L2CC_BASE);
@@ -108,6 +128,9 @@ static int ux500_l2x0_init(void)
else
ux500_unknown_soc();
+ /* Unlock before init */
+ ux500_l2x0_unlock();
+
/* 64KB way size, 8 way associativity, force WA */
l2x0_init(l2x0_base, 0x3e060000, 0xc0000fff);