aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7
diff options
context:
space:
mode:
authorTom Rini2015-09-03 14:57:09 -0400
committerTom Rini2015-09-03 14:57:09 -0400
commitc9feb427aba860ebc79f9851a1bb49cc456a2d48 (patch)
tree6a80def1806386e2854d57f740264c6744d96e1d /arch/arm/cpu/armv7
parentda9d8580ff9ce17452ef931072e5799a9df8807f (diff)
parentf2acc55e3d28e96a6fcc060a7081eb4e2ad96350 (diff)
Merge git://git.denx.de/u-boot-rockchip
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r--arch/arm/cpu/armv7/cpu.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 0b0e5003cc3..6eac5ef3fe0 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -36,12 +36,6 @@ int cleanup_before_linux_select(int flags)
disable_interrupts();
#endif
- /*
- * Turn off I-cache and invalidate it
- */
- icache_disable();
- invalidate_icache_all();
-
if (flags & CBL_DISABLE_CACHES) {
/*
* turn off D-cache
@@ -61,7 +55,16 @@ int cleanup_before_linux_select(int flags)
* to avoid coherency problems for kernel
*/
invalidate_dcache_all();
+
+ icache_disable();
+ invalidate_icache_all();
} else {
+ /*
+ * Turn off I-cache and invalidate it
+ */
+ icache_disable();
+ invalidate_icache_all();
+
flush_dcache_all();
invalidate_icache_all();
icache_enable();