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 enable_caches(void)9void 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 */ invalidate_icache_all(void)18void 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 invalidate_icache_all(void)25void invalidate_icache_all(void) 26 { 27 } 28 #endif 29