| Submitter | Simon Glass |
|---|---|
| Date | Nov. 1, 2012, 11:42 p.m. |
| Message ID | <1351813330-23741-2-git-send-email-sjg@chromium.org> |
| Download | mbox | patch |
| Permalink | /patch/196420/ |
| State | Superseded, archived |
| Delegated to: | Albert ARIBAUD |
| Headers | show |
Comments
Patch
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 8f8385d..03b9c80 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -134,8 +134,11 @@ static void cache_disable(uint32_t cache_bit) return; /* if disabling data cache, disable mmu too */ cache_bit |= CR_M; - flush_dcache_all(); } + reg = get_cr(); + cp_delay(); + if (cache_bit == (CR_C | CR_M)) + flush_dcache_all(); set_cr(reg & ~cache_bit); } #endif