diff options
Diffstat (limited to 'lib_microblaze')
-rw-r--r-- | lib_microblaze/cache.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib_microblaze/cache.c b/lib_microblaze/cache.c index a2f7493b61..4b2e8e3790 100644 --- a/lib_microblaze/cache.c +++ b/lib_microblaze/cache.c @@ -26,6 +26,18 @@ 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"); } |