From: Vladimir Zapolskiy Date: Sun, 27 Nov 2016 22:15:14 +0000 (+0200) Subject: sh4: cache: correct flush_cache() to writeback and invalidate X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=0f62bf633f287b8e9af1384d0ef1857fc5e8363e;p=u-boot.git sh4: cache: correct flush_cache() to writeback and invalidate In common usecases flush_cache() assumes both cache invalidation and write-back to memory, instead of doing cache invalidation only with the wrapped 'ocbi' instruction pin flush_cache() to cache invalidation with memory write-back done by 'ocbp'. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Simon Glass --- diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index de90ca777f..a2cec988f0 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -37,7 +37,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) void flush_cache (unsigned long addr, unsigned long size) { - invalidate_dcache_range(addr , addr + size); + flush_dcache_range(addr , addr + size); } void icache_enable (void)