2
* (C) Copyright 2007 Michal Simek
4
* Michal SIMEK <monstr@monstr.eu>
6
* SPDX-License-Identifier: GPL-2.0+
12
int dcache_status (void)
16
__asm__ __volatile__ ("mfs %0,rmsr"::"r" (i):"memory");
18
__asm__ __volatile__ ("and %0,%0,%1"::"r" (i), "r" (mask):"memory");
22
int icache_status (void)
26
__asm__ __volatile__ ("mfs %0,rmsr"::"r" (i):"memory");
28
__asm__ __volatile__ ("and %0,%0,%1"::"r" (i), "r" (mask):"memory");
32
void icache_enable (void) {
36
void icache_disable(void) {
37
/* we are not generate ICACHE size -> flush whole cache */
38
flush_cache(0, 32768);
42
void dcache_enable (void) {
46
void dcache_disable(void) {
47
#ifdef XILINX_USE_DCACHE
48
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
53
void flush_cache (ulong addr, ulong size)
56
for (i = 0; i < size; i += 4)