From 34a0c164a5368099351fe63e86543ed0f6d394b7 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 19 Jun 2024 15:27:57 -0600 Subject: powerpc: Implement a default flush_dcache_all Implement a weak default version of flush_dcache_all which is based on the ARM default, which is to flush the entire range via flush_dcache_range(...). Acked-by: Ilias Apalodimas Signed-off-by: Tom Rini --- arch/powerpc/lib/cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/powerpc/lib/cache.c') diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c index e480b269649..130318d745a 100644 --- a/arch/powerpc/lib/cache.c +++ b/arch/powerpc/lib/cache.c @@ -43,3 +43,12 @@ void flush_cache(ulong start_addr, ulong size) /* flush prefetch queue */ asm volatile("isync" : : : "memory"); } + +/* + * Default implementation: + * do a range flush for the entire range + */ +void flush_dcache_all(void) +{ + flush_dcache_range(0, ~0); +} -- cgit v1.2.3 From 280e54656f3e1a356baca02dc264d9d9407bf0a9 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 19 Jun 2024 15:27:58 -0600 Subject: powerpc: Add the old invalidate_icache_all function Add the old invalidate_icache_all function that prints a warning that was previously found in cmd/cache.c Signed-off-by: Tom Rini --- arch/powerpc/lib/cache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/powerpc/lib/cache.c') diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c index 130318d745a..a9cd7b8d30a 100644 --- a/arch/powerpc/lib/cache.c +++ b/arch/powerpc/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include @@ -52,3 +53,8 @@ void flush_dcache_all(void) { flush_dcache_range(0, ~0); } + +void invalidate_icache_all(void) +{ + puts("No arch specific invalidate_icache_all available!\n"); +} -- cgit v1.2.3