]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/microblaze/cache.c
ppc4xx: Disable pci node in device tree on CPCI405 pci adapters
[karo-tx-uboot.git] / cpu / microblaze / cache.c
index fc388ebb5629d97480998be75916cee1acad1927..4b7866fae50721a705f2eb8ca7a62ca0e369844d 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,9 @@
  */
 
 #include <common.h>
+#include <asm/asm.h>
 
-#if (CONFIG_COMMANDS & CFG_CMD_CACHE)
+#if 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