Skip to content

Commit

Permalink
sh4: cache: correct flush_cache() to writeback and invalidate
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
  • Loading branch information
vzapolskiy authored and trini committed Dec 3, 2016
1 parent ee47c4c commit 0f62bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/cpu/sh4/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f62bf6

Please sign in to comment.