summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv8/cache_v8.c
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2014-02-26 13:26:04 -0800
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-04-07 17:43:41 +0200
commit1e6ad55c058200010bb0649524a2c874e7049242 (patch)
treece208690a42037bb29a34a24ea512b8d0edd0835 /arch/arm/cpu/armv8/cache_v8.c
parent83571bcab10bc8d6d73dc77b64442dbd281afc99 (diff)
downloadtalos-obmc-uboot-1e6ad55c058200010bb0649524a2c874e7049242.tar.gz
talos-obmc-uboot-1e6ad55c058200010bb0649524a2c874e7049242.zip
armv8/cache: Change cache invalidate and flush function
When SoC first boots up, we should invalidate the cache but not flush it. We can use the same function for invalid and flush mostly, with a wrapper. Invalidating large cache can ben slow on emulator, so we postpone doing so until I-cache is enabled, and before enabling D-cache. Signed-off-by: York Sun <yorksun@freescale.com> CC: David Feng <fenghua@phytium.com.cn>
Diffstat (limited to 'arch/arm/cpu/armv8/cache_v8.c')
-rw-r--r--arch/arm/cpu/armv8/cache_v8.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 7acae1b0ac..a96ecda7e3 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -80,7 +80,7 @@ static void mmu_setup(void)
*/
void invalidate_dcache_all(void)
{
- __asm_flush_dcache_all();
+ __asm_invalidate_dcache_all();
}
/*
@@ -177,6 +177,7 @@ int dcache_status(void)
void icache_enable(void)
{
+ __asm_invalidate_icache_all();
set_sctlr(get_sctlr() | CR_I);
}
OpenPOWER on IntegriCloud