1 #ifndef __ASM_SH_CACHE_H
2 #define __ASM_SH_CACHE_H
4 #if defined(CONFIG_SH4) || defined(CONFIG_SH4A)
6 #define L1_CACHE_BYTES 32
7 struct __large_struct { unsigned long buf[100]; };
8 #define __m(x) (*(struct __large_struct *)(x))
10 void dcache_wback_range (u32 start, u32 end)
14 start &= ~(L1_CACHE_BYTES - 1);
15 for (v = start; v < end; v += L1_CACHE_BYTES) {
16 asm volatile ("ocbwb %0": /* no output */
21 void dcache_invalid_range (u32 start, u32 end)
25 start &= ~(L1_CACHE_BYTES - 1);
26 for (v = start; v < end; v += L1_CACHE_BYTES) {
27 asm volatile ("ocbi %0": /* no output */
31 #endif /* CONFIG_SH4 || CONFIG_SH4A */
33 #endif /* __ASM_SH_CACHE_H */