aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/cacheflush_no.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/m68k/include/asm/cacheflush_no.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'arch/m68k/include/asm/cacheflush_no.h')
-rw-r--r--arch/m68k/include/asm/cacheflush_no.h49
1 files changed, 14 insertions, 35 deletions
diff --git a/arch/m68k/include/asm/cacheflush_no.h b/arch/m68k/include/asm/cacheflush_no.h
index d2b3935ae14..cb88aa96c4f 100644
--- a/arch/m68k/include/asm/cacheflush_no.h
+++ b/arch/m68k/include/asm/cacheflush_no.h
@@ -30,22 +30,18 @@
30 30
31void mcf_cache_push(void); 31void mcf_cache_push(void);
32 32
33static inline void __clear_cache_all(void)
34{
35#ifdef CACHE_INVALIDATE
36 __asm__ __volatile__ (
37 "movec %0, %%CACR\n\t"
38 "nop\n\t"
39 : : "r" (CACHE_INVALIDATE) );
40#endif
41}
42
43static inline void __flush_cache_all(void) 33static inline void __flush_cache_all(void)
44{ 34{
45#ifdef CACHE_PUSH 35#ifdef CACHE_PUSH
46 mcf_cache_push(); 36 mcf_cache_push();
47#endif 37#endif
48 __clear_cache_all(); 38#ifdef CACHE_INVALIDATE
39 __asm__ __volatile__ (
40 "movel %0, %%d0\n\t"
41 "movec %%d0, %%CACR\n\t"
42 "nop\n\t"
43 : : "i" (CACHE_INVALIDATE) : "d0" );
44#endif
49} 45}
50 46
51/* 47/*
@@ -57,9 +53,10 @@ static inline void __flush_icache_all(void)
57{ 53{
58#ifdef CACHE_INVALIDATEI 54#ifdef CACHE_INVALIDATEI
59 __asm__ __volatile__ ( 55 __asm__ __volatile__ (
60 "movec %0, %%CACR\n\t" 56 "movel %0, %%d0\n\t"
57 "movec %%d0, %%CACR\n\t"
61 "nop\n\t" 58 "nop\n\t"
62 : : "r" (CACHE_INVALIDATEI) ); 59 : : "i" (CACHE_INVALIDATEI) : "d0" );
63#endif 60#endif
64} 61}
65 62
@@ -70,31 +67,13 @@ static inline void __flush_dcache_all(void)
70#endif 67#endif
71#ifdef CACHE_INVALIDATED 68#ifdef CACHE_INVALIDATED
72 __asm__ __volatile__ ( 69 __asm__ __volatile__ (
73 "movec %0, %%CACR\n\t" 70 "movel %0, %%d0\n\t"
71 "movec %%d0, %%CACR\n\t"
74 "nop\n\t" 72 "nop\n\t"
75 : : "r" (CACHE_INVALIDATED) ); 73 : : "i" (CACHE_INVALIDATED) : "d0" );
76#else 74#else
77 /* Flush the write buffer */ 75 /* Flush the wrtite buffer */
78 __asm__ __volatile__ ( "nop" ); 76 __asm__ __volatile__ ( "nop" );
79#endif 77#endif
80} 78}
81
82/*
83 * Push cache entries at supplied address. We want to write back any dirty
84 * data and then invalidate the cache lines associated with this address.
85 */
86static inline void cache_push(unsigned long paddr, int len)
87{
88 __flush_cache_all();
89}
90
91/*
92 * Clear cache entries at supplied address (that is don't write back any
93 * dirty data).
94 */
95static inline void cache_clear(unsigned long paddr, int len)
96{
97 __clear_cache_all();
98}
99
100#endif /* _M68KNOMMU_CACHEFLUSH_H */ 79#endif /* _M68KNOMMU_CACHEFLUSH_H */