12 #include <asm/cache.h>
13 #include <asm/addrspace.h>
14 #include <asm/processor.h>
15 #include <asm/cacheflush.h>
23 #define MAX_OCACHE_PAGES 32
24 #define MAX_ICACHE_PAGES 32
26 #ifdef CONFIG_CACHE_WRITEBACK
27 static void sh2a_flush_oc_line(
unsigned long v,
int way)
29 unsigned long addr = (v & 0x000007f0) | (way << 11);
40 static void sh2a_invalidate_line(
unsigned long cache_addr,
unsigned long v)
50 static void sh2a__flush_wback_region(
void *
start,
int size)
52 #ifdef CONFIG_CACHE_WRITEBACK
54 unsigned long begin,
end;
78 for (way = 0; way < nr_ways; way++) {
80 sh2a_flush_oc_line(v, way);
92 static void sh2a__flush_purge_region(
void *start,
int size)
95 unsigned long begin,
end;
106 #ifdef CONFIG_CACHE_WRITEBACK
109 for (way = 0; way < nr_ways; way++)
110 sh2a_flush_oc_line(v, way);
122 static void sh2a__flush_invalidate_region(
void *start,
int size)
125 unsigned long begin,
end;
150 static void sh2a_flush_icache_range(
void *args)
152 struct flusher_data *
data = args;
160 #ifdef CONFIG_CACHE_WRITEBACK
161 sh2a__flush_wback_region((
void *)start, end-start);