aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/Kconfig4
-rw-r--r--arch/microblaze/cpu/cache.c15
-rw-r--r--arch/microblaze/lib/bootm.c2
3 files changed, 10 insertions, 11 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 6f45d19..11ccbcc 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -39,10 +39,6 @@ config TARGET_MICROBLAZE_GENERIC
endchoice
-config DCACHE
- bool "Enable dcache support"
- default y
-
config ICACHE
bool "Enable icache support"
default y
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index b6126de..4e8e228 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -49,26 +49,31 @@ void dcache_enable(void)
void dcache_disable(void)
{
-#ifdef CONFIG_DCACHE
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
-#endif
+
MSRCLR(0x80);
}
void flush_cache(ulong addr, ulong size)
{
int i;
- for (i = 0; i < size; i += 4)
+ for (i = 0; i < size; i += 4) {
asm volatile (
#ifdef CONFIG_ICACHE
"wic %0, r0;"
#endif
"nop;"
-#ifdef CONFIG_DCACHE
+ :
+ : "r" (addr + i)
+ : "memory");
+
+ if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) {
+ asm volatile (
"wdc.flush %0, r0;"
-#endif
"nop;"
:
: "r" (addr + i)
: "memory");
+ }
+ }
}
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index b652d27..dba6226 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -57,9 +57,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
"(fake run for tracing)" : "");
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
-#ifdef CONFIG_DCACHE
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
-#endif
if (!fake) {
/*