summaryrefslogtreecommitdiff
path: root/arch/arm/lib/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib/cache.c')
-rw-r--r--arch/arm/lib/cache.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index cd13db3..3bd8710 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -88,3 +88,14 @@ phys_addr_t noncached_alloc(size_t size, size_t align)
return next;
}
#endif /* CONFIG_SYS_NONCACHED_MEMORY */
+
+#if defined(CONFIG_SYS_THUMB_BUILD)
+void invalidate_l2_cache(void)
+{
+ unsigned int val = 0;
+
+ asm volatile("mcr p15, 1, %0, c15, c11, 0 @ invl l2 cache"
+ : : "r" (val) : "cc");
+ isb();
+}
+#endif