1 /* 2 * (C) Copyright 2016 3 * Heiko Schocher, DENX Software Engineering, hs@denx.de. 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 */ 7 #include <linux/types.h> 8 #include <common.h> 9 enable_caches(void)10void enable_caches(void) 11 { 12 #ifndef CONFIG_SYS_ICACHE_OFF 13 icache_enable(); 14 #endif 15 } 16 17 #ifndef CONFIG_SYS_ICACHE_OFF 18 /* Invalidate entire I-cache and branch predictor array */ invalidate_icache_all(void)19void invalidate_icache_all(void) 20 { 21 unsigned long i = 0; 22 23 asm ("mcr p15, 0, %0, c7, c5, 0" : : "r" (i)); 24 } 25 #else invalidate_icache_all(void)26void invalidate_icache_all(void) 27 { 28 } 29 #endif 30