@@ -59,6 +59,16 @@ static int ux500_l2x0_init(void)
else
ux500_unknown_soc();
+ /*
+ * Unlock Data and Instruction Lock if locked. Ux500 U-Boot versions
+ * apparently locks both caches before jumping to the kernel.
+ */
+ 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);
+
/* 64KB way size, 8 way associativity, force WA */
l2x0_init(l2x0_base, 0x3e060000, 0xc0000fff);