diff options
Diffstat (limited to 'arch/m68k/include/asm/cacheflush_mm.h')
-rw-r--r-- | arch/m68k/include/asm/cacheflush_mm.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/cacheflush_mm.h b/arch/m68k/include/asm/cacheflush_mm.h index 8104bd874649..fa2c3d681d84 100644 --- a/arch/m68k/include/asm/cacheflush_mm.h +++ b/arch/m68k/include/asm/cacheflush_mm.h | |||
@@ -16,7 +16,48 @@ | |||
16 | #define DCACHE_MAX_ADDR 0 | 16 | #define DCACHE_MAX_ADDR 0 |
17 | #define DCACHE_SETMASK 0 | 17 | #define DCACHE_SETMASK 0 |
18 | #endif | 18 | #endif |
19 | #ifndef CACHE_MODE | ||
20 | #define CACHE_MODE 0 | ||
21 | #define CACR_ICINVA 0 | ||
22 | #define CACR_DCINVA 0 | ||
23 | #define CACR_BCINVA 0 | ||
24 | #endif | ||
25 | |||
26 | /* | ||
27 | * ColdFire architecture has no way to clear individual cache lines, so we | ||
28 | * are stuck invalidating all the cache entries when we want a clear operation. | ||
29 | */ | ||
30 | static inline void clear_cf_icache(unsigned long start, unsigned long end) | ||
31 | { | ||
32 | __asm__ __volatile__ ( | ||
33 | "movec %0,%%cacr\n\t" | ||
34 | "nop" | ||
35 | : | ||
36 | : "r" (CACHE_MODE | CACR_ICINVA | CACR_BCINVA)); | ||
37 | } | ||
38 | |||
39 | static inline void clear_cf_dcache(unsigned long start, unsigned long end) | ||
40 | { | ||
41 | __asm__ __volatile__ ( | ||
42 | "movec %0,%%cacr\n\t" | ||
43 | "nop" | ||
44 | : | ||
45 | : "r" (CACHE_MODE | CACR_DCINVA)); | ||
46 | } | ||
19 | 47 | ||
48 | static inline void clear_cf_bcache(unsigned long start, unsigned long end) | ||
49 | { | ||
50 | __asm__ __volatile__ ( | ||
51 | "movec %0,%%cacr\n\t" | ||
52 | "nop" | ||
53 | : | ||
54 | : "r" (CACHE_MODE | CACR_ICINVA | CACR_BCINVA | CACR_DCINVA)); | ||
55 | } | ||
56 | |||
57 | /* | ||
58 | * Use the ColdFire cpushl instruction to push (and invalidate) cache lines. | ||
59 | * The start and end addresses are cache line numbers not memory addresses. | ||
60 | */ | ||
20 | static inline void flush_cf_icache(unsigned long start, unsigned long end) | 61 | static inline void flush_cf_icache(unsigned long start, unsigned long end) |
21 | { | 62 | { |
22 | unsigned long set; | 63 | unsigned long set; |