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.
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"
"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