cpu/ non-mpc*: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
[platform/kernel/u-boot.git] / cpu / microblaze / cache.c
old mode 100644 (file)
new mode 100755 (executable)
index fc388eb..2921551
@@ -23,8 +23,9 @@
  */
 
 #include <common.h>
+#include <asm/asm.h>
 
-#if (CONFIG_COMMANDS & CFG_CMD_CACHE)
+#if (CONFIG_COMMANDS & CFG_CMD_CACHE) || defined(CONFIG_CMD_CACHE)
 
 int dcache_status (void)
 {
@@ -45,4 +46,20 @@ int icache_status (void)
        __asm__ __volatile__ ("and %0,%0,%1"::"r" (i), "r" (mask):"memory");
        return i;
 }
+
+void   icache_enable (void) {
+       MSRSET(0x20);
+}
+
+void   icache_disable(void) {
+       MSRCLR(0x20);
+}
+
+void   dcache_enable (void) {
+       MSRSET(0x80);
+}
+
+void   dcache_disable(void) {
+       MSRCLR(0x80);
+}
 #endif