From 4b6243ca36127091c17dba9dff98ba46f619f506 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Sun, 25 May 2003 03:33:22 -0700 Subject: [PATCH] fix ColdFire 5407 cache flushing This fixes some ColdFire 5407 cache bogosity. Previous code was pushing all cache lines and the invalidating all of the cache. The push should be enough, and now with underlying fixes the the cache setup registers it is. Removed the whole invalidate cycle. Original patch cam from Allessandro Rubini. --- include/asm-m68knommu/cacheflush.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index dfa537d547b1..5429ea10ed3c 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h @@ -20,6 +20,11 @@ extern inline void __flush_cache_all(void) { #ifdef CONFIG_M5407 + /* + * Use cpushl to push and invalidate all cache lines. + * Gas doesn't seem to know how to generate the ColdFire + * cpushl instruction... Oh well, bit stuff it for now. + */ __asm__ __volatile__ ( "nop\n\t" "clrl %%d0\n\t" @@ -33,11 +38,6 @@ extern inline void __flush_cache_all(void) "addql #1,%%d0\n\t" "cmpil #4,%%d0\n\t" "bne 1b\n\t" - "movel #0x01040100,%%d0\n\t" - "movec %%d0,%%CACR\n\t" - "nop\n\t" - "movel #0x86088400,%%d0\n\t" - "movec %%d0,%%CACR\n\t" : : : "d0", "a0" ); #endif /* CONFIG_M5407 */ #ifdef CONFIG_M5272 -- cgit v1.2.3