From 353f5ee6c4f53408a838db569838133dc80dd747 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Wed, 2 May 2012 17:02:21 +1000 Subject: [PATCH] --- yaml --- r: 302680 b: refs/heads/master c: 1744bd921cd1037f0415574e0f8a3611984ecc7c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/m68k/include/asm/cacheflush_no.h | 32 ++++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9ff03f4131b1..4ac25c541d82 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 453549d2e511a8490e04f91b084aa418f9f4e5d2 +refs/heads/master: 1744bd921cd1037f0415574e0f8a3611984ecc7c diff --git a/trunk/arch/m68k/include/asm/cacheflush_no.h b/trunk/arch/m68k/include/asm/cacheflush_no.h index cb88aa96c4f1..7cafb537d03c 100644 --- a/trunk/arch/m68k/include/asm/cacheflush_no.h +++ b/trunk/arch/m68k/include/asm/cacheflush_no.h @@ -30,11 +30,8 @@ void mcf_cache_push(void); -static inline void __flush_cache_all(void) +static inline void __clear_cache_all(void) { -#ifdef CACHE_PUSH - mcf_cache_push(); -#endif #ifdef CACHE_INVALIDATE __asm__ __volatile__ ( "movel %0, %%d0\n\t" @@ -44,6 +41,14 @@ static inline void __flush_cache_all(void) #endif } +static inline void __flush_cache_all(void) +{ +#ifdef CACHE_PUSH + mcf_cache_push(); +#endif + __clear_cache_all(); +} + /* * Some ColdFire parts implement separate instruction and data caches, * 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) __asm__ __volatile__ ( "nop" ); #endif } + +/* + * Push cache entries at supplied address. We want to write back any dirty + * data and the invalidate the cache lines associated with this address. + */ +static inline void cache_push(unsigned long paddr, int len) +{ + __flush_cache_all(); +} + +/* + * Clear cache entries at supplied address (that is don't write back any + * dirty data). + */ +static inline void cache_clear(unsigned long paddr, int len) +{ + __clear_cache_all(); +} + #endif /* _M68KNOMMU_CACHEFLUSH_H */