1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2014 Samsung Electronics
4 * Minkyu Kang <mk7.kang@samsung.com>
5 * Robert Baldyga <r.baldyga@samsung.com>
7 * based on arch/arm/cpu/armv7/omap3/cache.S
12 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
13 void enable_caches(void)
18 void disable_caches(void)
24 #ifndef CONFIG_SYS_L2CACHE_OFF
25 void v7_outer_cache_enable(void)
28 "push {r0, r1, r2, lr}\n\t"
29 "mrc 15, 0, r3, cr1, cr0, 1\n\t"
31 "mcr 15, 0, r3, cr1, cr0, 1\n\t"
32 "pop {r1, r2, r3, pc}"
36 void v7_outer_cache_disable(void)
39 "push {r0, r1, r2, lr}\n\t"
40 "mrc 15, 0, r3, cr1, cr0, 1\n\t"
42 "mcr 15, 0, r3, cr1, cr0, 1\n\t"
43 "pop {r1, r2, r3, pc}"