]> git.ipfire.org Git - thirdparty/u-boot.git/blob - arch/arm/mach-at91/arm926ejs/cache.c
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / arch / arm / mach-at91 / arm926ejs / cache.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * (C) Copyright 2016
4 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5 */
6 #include <linux/types.h>
7 #include <common.h>
8
9 void enable_caches(void)
10 {
11 #ifndef CONFIG_SYS_ICACHE_OFF
12 icache_enable();
13 #endif
14 }
15
16 #ifndef CONFIG_SYS_ICACHE_OFF
17 /* Invalidate entire I-cache and branch predictor array */
18 void invalidate_icache_all(void)
19 {
20 unsigned long i = 0;
21
22 asm ("mcr p15, 0, %0, c7, c5, 0" : : "r" (i));
23 }
24 #else
25 void invalidate_icache_all(void)
26 {
27 }
28 #endif