From: Stefan Roese <sr@denx.de>
Date: Thu, 14 May 2020 09:59:04 +0000 (+0200)
Subject: mips: cache: Make flush_cache() weak to enable overwrite
X-Git-Tag: v2025.01-rc5-pxa1908~2302^2~15
X-Git-Url: http://git.dujemihanovic.xyz/browse.php?a=commitdiff_plain;h=1d4ba15c6fe1265c5964cce3436fd501b14bae3b;p=u-boot.git

mips: cache: Make flush_cache() weak to enable overwrite

This patch adds __weak to flush_cache() in lib/cache.c. This makes it
possible to overwrite this function by a platforms specific version,
like done with the Octeon base port.

Signed-off-by: Stefan Roese <sr@denx.de>
---

diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index b5c42aeed7..ad37f05802 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -107,7 +107,7 @@ static inline unsigned long scache_line_size(void)
 	}								\
 } while (0)
 
-void flush_cache(ulong start_addr, ulong size)
+void __weak flush_cache(ulong start_addr, ulong size)
 {
 	unsigned long ilsize = icache_line_size();
 	unsigned long dlsize = dcache_line_size();