5 * SPDX-License-Identifier: GPL-2.0+
8 /* for now: just dummy functions to satisfy the linker */
12 __weak void flush_cache(unsigned long start, unsigned long size)
14 #if defined(CONFIG_ARM1136)
16 #if !defined(CONFIG_SYS_ICACHE_OFF)
17 asm("mcr p15, 0, r1, c7, c5, 0"); /* invalidate I cache */
20 #if !defined(CONFIG_SYS_DCACHE_OFF)
21 asm("mcr p15, 0, r1, c7, c14, 0"); /* Clean+invalidate D cache */
24 #endif /* CONFIG_ARM1136 */
26 #ifdef CONFIG_ARM926EJS
27 /* test and clean, page 2-23 of arm926ejs manual */
28 asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : : "memory");
29 /* disable write buffer as well (page 2-22) */
30 asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
31 #endif /* CONFIG_ARM926EJS */
36 * Default implementation:
37 * do a range flush for the entire range
39 __weak void flush_dcache_all(void)
45 * Default implementation of enable_caches()
46 * Real implementation should be in platform code
48 __weak void enable_caches(void)
50 puts("WARNING: Caches not enabled\n");