diff options
| author | Ben Warren <[email protected]> | 2009-01-24 20:44:56 -0800 |
|---|---|---|
| committer | Ben Warren <[email protected]> | 2009-01-24 20:44:56 -0800 |
| commit | ef29884b2708a6cce3b77f4ccaeea193d4e02c22 (patch) | |
| tree | 2f6a28872ab9f5de9fec7ac878b8801f5f536eec /lib_microblaze/cache.c | |
| parent | 4cd8ed40615a7d741ef2f09ee53779ec6907b8a6 (diff) | |
| parent | 8f86a3636ef88427f880610638e80991adc41896 (diff) | |
Merge git://git.denx.de/u-boot into u-boot
Diffstat (limited to 'lib_microblaze/cache.c')
| -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 a2f7493b61e..4b2e8e3790e 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"); } |
