aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras.kondratiuk@linaro.org>2014-01-09 19:27:08 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-01-12 09:15:27 -0500
commitb25f3e1c358434bf850220e04f28eebfc45eb634 (patch)
tree5b72a6f960fad442b71df141d415eaa8a592c4e8
parentd6cd989477e2fee29ccda257614ef7b2621d0601 (diff)
ARM: 7938/1: OMAP4/highbank: Flush L2 cache before disabling
Kexec disables outer cache before jumping to reboot code, but it doesn't flush it explicitly. Flush is done implicitly inside of l2x0_disable(). But some SoC's override default .disable handler and don't flush cache. This may lead to a corrupted memory during Kexec reboot on these platforms. This patch adds cache flush inside of OMAP4 and Highbank outer_cache.disable() handlers to make it consistent with default l2x0_disable(). Acked-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-highbank/highbank.c1
-rw-r--r--arch/arm/mach-omap2/omap4-common.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index b3d7e5634b83..ae171506cb06 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -50,6 +50,7 @@ static void __init highbank_scu_map_io(void)
50 50
51static void highbank_l2x0_disable(void) 51static void highbank_l2x0_disable(void)
52{ 52{
53 outer_flush_all();
53 /* Disable PL310 L2 Cache controller */ 54 /* Disable PL310 L2 Cache controller */
54 highbank_smc1(0x102, 0x0); 55 highbank_smc1(0x102, 0x0);
55} 56}
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 57911430324e..3f44b162fcab 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -163,6 +163,7 @@ void __iomem *omap4_get_l2cache_base(void)
163 163
164static void omap4_l2x0_disable(void) 164static void omap4_l2x0_disable(void)
165{ 165{
166 outer_flush_all();
166 /* Disable PL310 L2 Cache controller */ 167 /* Disable PL310 L2 Cache controller */
167 omap_smc1(0x102, 0x0); 168 omap_smc1(0x102, 0x0);
168} 169}