microblaze: cache: introduce flush_cache_all()
All flush_cache() calls in microblaze code are supposed to flush the
entire instruction and data caches, so introduce flush_cache_all()
helper to handle this.
Also, provide implementations for flush_dcache_all() and
invalidate_icache_all() so that icache and dcache u-boot commands can
work.
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Link: https://lore.kernel.org/r/20220531181435.3473549-9-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 6e3ffaf..e6a30e8 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -98,9 +98,7 @@
#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 */
@@ -349,9 +347,7 @@
#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 */