}
}
-#define CACHE_ENABLE 0
-#define CACHE_DISABLE 1
+#define CACHE_ENABLE 0
+#define CACHE_DISABLE 1
+#define CACHE_INVALIDATE 2
static int cache_control(unsigned int cmd)
{
if (ccr & CCR_CACHE_ENABLE)
cache_wback_all();
- if (cmd == CACHE_DISABLE)
+ if (cmd == CACHE_INVALIDATE)
+ outl(CCR_CACHE_ICI | ccr, CCR);
+ else if (cmd == CACHE_DISABLE)
outl(CCR_CACHE_STOP, CCR);
else
outl(CCR_CACHE_INIT, CCR);
void invalidate_icache_all(void)
{
- puts("No arch specific invalidate_icache_all available!\n");
+ cache_control(CACHE_INVALIDATE);
}
int icache_status(void)