From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Zapolskiy Date: Mon, 8 Aug 2016 21:13:18 +0300 Subject: [U-Boot] [PATCH 2/6] sh4: cache: correct flush_cache() to writeback and invalidate In-Reply-To: <1470680002-16354-1-git-send-email-vz@mleia.com> References: <1470680002-16354-1-git-send-email-vz@mleia.com> Message-ID: <1470680002-16354-3-git-send-email-vz@mleia.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/sh/cpu/sh4/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index e8ee0a4..e6b5c86 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) -- 2.8.1