diff options
| author | Nobuhiro Iwamatsu <[email protected]> | 2007-09-23 01:29:43 +0900 |
|---|---|---|
| committer | Nobuhiro Iwamatsu <[email protected]> | 2007-09-23 01:29:43 +0900 |
| commit | b8685affe614ccf5f4ec66252b30e2e524d18948 (patch) | |
| tree | 05bc55b8a4a0451e6500f1f52651d81c0f48f012 /cpu/microblaze/cache.c | |
| parent | 69df3c4da0c93017cceb25a366e794570bd0ed98 (diff) | |
| parent | 66dcad3a9a53e0766d90e0084123bd8529522fb0 (diff) | |
Merge git://www.denx.de/git/u-boot
Conflicts:
CREDITS
Diffstat (limited to 'cpu/microblaze/cache.c')
| -rw-r--r-- | cpu/microblaze/cache.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpu/microblaze/cache.c b/cpu/microblaze/cache.c index fc388ebb562..6ce0b55b243 100644 --- a/cpu/microblaze/cache.c +++ b/cpu/microblaze/cache.c @@ -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 |
