From patchwork Thu May 14 09:59:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 245768 List-Id: U-Boot discussion From: sr at denx.de (Stefan Roese) Date: Thu, 14 May 2020 11:59:04 +0200 Subject: [PATCH v2 04/12] mips: cache: Make flush_cache() weak to enable overwrite In-Reply-To: <20200514095912.14428-1-sr@denx.de> References: <20200514095912.14428-1-sr@denx.de> Message-ID: <20200514095912.14428-5-sr@denx.de> 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 --- Changes in v2: - New patch arch/mips/lib/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c index fdffe9493b..8dd025a79e 100644 --- a/arch/mips/lib/cache.c +++ b/arch/mips/lib/cache.c @@ -105,7 +105,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();