diff options
-rw-r--r-- | arch/m68k/include/asm/cacheflush_no.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/cacheflush_no.h b/arch/m68k/include/asm/cacheflush_no.h index cb88aa96c4f1..7cafb537d03c 100644 --- a/arch/m68k/include/asm/cacheflush_no.h +++ b/arch/m68k/include/asm/cacheflush_no.h | |||
@@ -30,11 +30,8 @@ | |||
30 | 30 | ||
31 | void mcf_cache_push(void); | 31 | void mcf_cache_push(void); |
32 | 32 | ||
33 | static inline void __flush_cache_all(void) | 33 | static inline void __clear_cache_all(void) |
34 | { | 34 | { |
35 | #ifdef CACHE_PUSH | ||
36 | mcf_cache_push(); | ||
37 | #endif | ||
38 | #ifdef CACHE_INVALIDATE | 35 | #ifdef CACHE_INVALIDATE |
39 | __asm__ __volatile__ ( | 36 | __asm__ __volatile__ ( |
40 | "movel %0, %%d0\n\t" | 37 | "movel %0, %%d0\n\t" |
@@ -44,6 +41,14 @@ static inline void __flush_cache_all(void) | |||
44 | #endif | 41 | #endif |
45 | } | 42 | } |
46 | 43 | ||
44 | static inline void __flush_cache_all(void) | ||
45 | { | ||
46 | #ifdef CACHE_PUSH | ||
47 | mcf_cache_push(); | ||
48 | #endif | ||
49 | __clear_cache_all(); | ||
50 | } | ||
51 | |||
47 | /* | 52 | /* |
48 | * Some ColdFire parts implement separate instruction and data caches, | 53 | * Some ColdFire parts implement separate instruction and data caches, |
49 | * on those we should just flush the appropriate cache. If we don't need | 54 | * on those we should just flush the appropriate cache. If we don't need |
@@ -76,4 +81,23 @@ static inline void __flush_dcache_all(void) | |||
76 | __asm__ __volatile__ ( "nop" ); | 81 | __asm__ __volatile__ ( "nop" ); |
77 | #endif | 82 | #endif |
78 | } | 83 | } |
84 | |||
85 | /* | ||
86 | * Push cache entries at supplied address. We want to write back any dirty | ||
87 | * data and the invalidate the cache lines associated with this address. | ||
88 | */ | ||
89 | static inline void cache_push(unsigned long paddr, int len) | ||
90 | { | ||
91 | __flush_cache_all(); | ||
92 | } | ||
93 | |||
94 | /* | ||
95 | * Clear cache entries at supplied address (that is don't write back any | ||
96 | * dirty data). | ||
97 | */ | ||
98 | static inline void cache_clear(unsigned long paddr, int len) | ||
99 | { | ||
100 | __clear_cache_all(); | ||
101 | } | ||
102 | |||
79 | #endif /* _M68KNOMMU_CACHEFLUSH_H */ | 103 | #endif /* _M68KNOMMU_CACHEFLUSH_H */ |