Commit 4b6243ca authored by Greg Ungerer's avatar Greg Ungerer Committed by Linus Torvalds

[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.
parent b27a08c3
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
extern inline void __flush_cache_all(void) extern inline void __flush_cache_all(void)
{ {
#ifdef CONFIG_M5407 #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__ ( __asm__ __volatile__ (
"nop\n\t" "nop\n\t"
"clrl %%d0\n\t" "clrl %%d0\n\t"
...@@ -33,11 +38,6 @@ extern inline void __flush_cache_all(void) ...@@ -33,11 +38,6 @@ extern inline void __flush_cache_all(void)
"addql #1,%%d0\n\t" "addql #1,%%d0\n\t"
"cmpil #4,%%d0\n\t" "cmpil #4,%%d0\n\t"
"bne 1b\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" ); : : : "d0", "a0" );
#endif /* CONFIG_M5407 */ #endif /* CONFIG_M5407 */
#ifdef CONFIG_M5272 #ifdef CONFIG_M5272
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment