X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fmicroblaze%2Fcache.c;h=4b7866fae50721a705f2eb8ca7a62ca0e369844d;hb=9c73f4b81172bc9f1b8f132450e69bcfb5b960ca;hp=fc388ebb5629d97480998be75916cee1acad1927;hpb=e8aac8e7bfc7cfdef5780f8f1d4c85184f59a06f;p=oweals%2Fu-boot.git diff --git a/cpu/microblaze/cache.c b/cpu/microblaze/cache.c index fc388ebb56..4b7866fae5 100644 --- a/cpu/microblaze/cache.c +++ b/cpu/microblaze/cache.c @@ -1,7 +1,7 @@ /* * (C) Copyright 2007 Michal Simek * - * Michal SIMEK + * Michal SIMEK * * See file CREDITS for list of people who contributed to this * project. @@ -23,8 +23,9 @@ */ #include +#include -#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