]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib_microblaze/cache.c
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / lib_microblaze / cache.c
index a2f7493b61ee7e42af154f443261fa173bf0980b..4b2e8e3790e6ef3b4197ecc765a441ebcfdabc2c 100755 (executable)
 
 void flush_cache (ulong addr, ulong size)
 {
-       /* MicroBlaze have write thruough cache. nothing to do. */
-       return;
+       int i;
+       for (i = 0; i < size; i += 4)
+               asm volatile (
+#ifdef CONFIG_ICACHE
+                               "wic    %0, r0;"
+#endif
+                               "nop;"
+#ifdef CONFIG_DCACHE
+                               "wdc    %0, r0;"
+#endif
+                               "nop;"
+                               :
+                               : "r" (addr + i)
+                               : "memory");
 }