}
}
+void invalidate_icache_all(void)
+{
+ __invalidate_icache(0, CONFIG_XILINX_MICROBLAZE0_ICACHE_SIZE);
+}
+
static void __flush_dcache(ulong addr, ulong size)
{
if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) {
}
}
+void flush_dcache_all(void)
+{
+ __flush_dcache(0, CONFIG_XILINX_MICROBLAZE0_DCACHE_SIZE);
+}
+
int dcache_status(void)
{
int i = 0;
void icache_disable(void)
{
- __invalidate_icache(0, CONFIG_XILINX_MICROBLAZE0_ICACHE_SIZE);
+ invalidate_icache_all();
MSRCLR(0x20);
}
void dcache_disable(void)
{
- __flush_dcache(0, CONFIG_XILINX_MICROBLAZE0_DCACHE_SIZE);
+ flush_dcache_all();
MSRCLR(0x80);
}
__invalidate_icache(addr, size);
__flush_dcache(addr, size);
}
+
+void flush_cache_all(void)
+{
+ invalidate_icache_all();
+ flush_dcache_all();
+}
#endif
/* Flush cache before enable cache */
- addik r5, r0, 0
- addik r6, r0, CONFIG_XILINX_MICROBLAZE0_DCACHE_SIZE
- brlid r15, flush_cache
+ brlid r15, flush_cache_all
nop
/* enable instruction and data cache */
#endif
/* Flush caches to ensure consistency */
- addik r5, r0, 0
- addik r6, r0, CONFIG_XILINX_MICROBLAZE0_DCACHE_SIZE
- brlid r15, flush_cache
+ brlid r15, flush_cache_all
nop
2: addi r5, r31, 0 /* gd is initialized in board_r.c */
#define ARCH_DMA_MINALIGN 16
#endif
+/**
+ * flush_cache_all - flush the entire instruction/data caches
+ */
+void flush_cache_all(void);
+
#endif /* __MICROBLAZE_CACHE_H__ */
"(fake run for tracing)" : "");
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
- flush_cache(0, CONFIG_XILINX_MICROBLAZE0_DCACHE_SIZE);
+ flush_cache_all();
if (!fake) {
/*