Skip to content

Commit

Permalink
ARM: 7938/1: OMAP4/highbank: Flush L2 cache before disabling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Taras Kondratiuk authored and Russell King committed Jan 12, 2014
1 parent d6cd989 commit b25f3e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-highbank/highbank.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static void __init highbank_scu_map_io(void)

static void highbank_l2x0_disable(void)
{
outer_flush_all();
/* Disable PL310 L2 Cache controller */
highbank_smc1(0x102, 0x0);
}
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/omap4-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ void __iomem *omap4_get_l2cache_base(void)

static void omap4_l2x0_disable(void)
{
outer_flush_all();
/* Disable PL310 L2 Cache controller */
omap_smc1(0x102, 0x0);
}
Expand Down

0 comments on commit b25f3e1

Please sign in to comment.