[U-Boot] [PATCH 1/2] armv8: caches: Disable dcache after flush
Michal Simek
michal.simek at xilinx.com
Wed Apr 15 13:33:00 CEST 2015
From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>
Always disable dcache after the flush operation
The following sequence is advisable while disabling d-cache:
1. disable_dcache() - flushes and disables d-cache
2. invalidate_dcache_all() - invalid any entry that came to the cache
in the short period after the cache was flushed but before the
cache got disabled
Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
arch/arm/cpu/armv8/cache_v8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index c5ec5297cd39..2a0492fbef52 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -128,10 +128,10 @@ void dcache_disable(void)
if (!(sctlr & CR_C))
return;
- set_sctlr(sctlr & ~(CR_C|CR_M));
-
flush_dcache_all();
__asm_invalidate_tlb_all();
+
+ set_sctlr(sctlr & ~(CR_C|CR_M));
}
int dcache_status(void)
--
2.3.5
More information about the U-Boot
mailing list