diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2015-10-12 15:54:50 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-10-13 10:44:55 +0200 |
commit | 37a81422fd0df900845421a1d9273396e57a304e (patch) | |
tree | c3219ad1f680241744cbf1487dab6746973e7e51 /arch/arm/cpu | |
parent | b4e1bdbb50c6cc0bb6d5094d6156cf484c1318e8 (diff) | |
download | barebox-37a81422fd0df900845421a1d9273396e57a304e.tar.gz barebox-37a81422fd0df900845421a1d9273396e57a304e.tar.xz |
ARM: l2x0: move outer cache flush on disable to user
There are systems like the Calxeda Highbank, which need to do SMC
calls in order to access the secure L2C registers, which means they
want to replace the outer cache disable function with their own.
As the cache flush before entering the boot target is still needed
and to avoid exposing L2C internals to the architectures move the
flush before disable into the only current user.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/cache-l2x0.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/cpu.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/cpu/cache-l2x0.c b/arch/arm/cpu/cache-l2x0.c index 6bd540ea69..0aa2482321 100644 --- a/arch/arm/cpu/cache-l2x0.c +++ b/arch/arm/cpu/cache-l2x0.c @@ -124,8 +124,6 @@ static void l2x0_flush_all(void) static void l2x0_disable(void) { - writel(0xff, l2x0_base + L2X0_CLEAN_INV_WAY); - while (readl(l2x0_base + L2X0_CLEAN_INV_WAY)); writel(0, l2x0_base + L2X0_CTRL); } diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index ff8f43d175..e8191ecde5 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -80,8 +80,10 @@ struct outer_cache_fns outer_cache; void mmu_disable(void) { __mmu_cache_flush(); - if (outer_cache.disable) + if (outer_cache.disable) { + outer_cache.flush_all(); outer_cache.disable(); + } __mmu_cache_off(); } |