From b006777ce59e143100a5988cd324b8e416d22380 Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Fri, 26 Dec 2025 09:41:13 -0500 Subject: [PATCH] risc-v/litex: Implement up_flush_dcache_all when CONFIG_ARCH_DCACHE is defined. This duplicates the up_invalidate_dcache_all as vexriscv's DBUS cache does not distinguish between flushing and invalidation. Signed-off-by: Justin Erenkrantz --- arch/risc-v/src/litex/litex_cache.S | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/risc-v/src/litex/litex_cache.S b/arch/risc-v/src/litex/litex_cache.S index 37bb1d65b82e9..2820a3843194d 100644 --- a/arch/risc-v/src/litex/litex_cache.S +++ b/arch/risc-v/src/litex/litex_cache.S @@ -56,6 +56,28 @@ up_invalidate_dcache_all: .word 0x500F #endif +/**************************************************************************** + * Name: up_flush_dcache_all + * + * Description: + * Flush the entire contents of D cache. + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_ARCH_DCACHE + .globl up_flush_dcache_all + .type up_flush_dcache_all, function + +up_flush_dcache_all: + .word 0x500F +#endif + /**************************************************************************** * Name: up_invalidate_icache_all *