ppc4xx: Update flash size in reg property of the NOR flash node
[oweals/u-boot.git] / cpu / microblaze / cache.c
index fc388ebb5629d97480998be75916cee1acad1927..3b7c4d4f7f9a61b79a0dc1cde5b778e5aab12b3d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * (C) Copyright 2007 Michal Simek
  *
- * Michal SIMEK <moonstr@monstr.eu>
+ * Michal SIMEK <monstr@monstr.eu>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -23,8 +23,7 @@
  */
 
 #include <common.h>
-
-#if (CONFIG_COMMANDS & CFG_CMD_CACHE)
+#include <asm/asm.h>
 
 int dcache_status (void)
 {
@@ -45,4 +44,19 @@ int icache_status (void)
        __asm__ __volatile__ ("and %0,%0,%1"::"r" (i), "r" (mask):"memory");
        return i;
 }
-#endif
+
+void   icache_enable (void) {
+       MSRSET(0x20);
+}
+
+void   icache_disable(void) {
+       MSRCLR(0x20);
+}
+
+void   dcache_enable (void) {
+       MSRSET(0x80);
+}
+
+void   dcache_disable(void) {
+       MSRCLR(0x80);
+}