From: Stefan Kristiansson Date: Fri, 4 Nov 2011 12:38:08 +0000 (+0200) Subject: nios2: add flush_dcache_range function X-Git-Tag: v2012.04-rc2~10^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8875833a86e567c0ca4258353116294089d24625;p=u-boot nios2: add flush_dcache_range function exposes functionality to flush dcache according to the common.h API Signed-off-by: Stefan Kristiansson Cc: Thomas Chou Signed-off-by: Thomas Chou --- diff --git a/arch/nios2/lib/cache.S b/arch/nios2/lib/cache.S index ee3b4b79bf..b952d0c901 100644 --- a/arch/nios2/lib/cache.S +++ b/arch/nios2/lib/cache.S @@ -48,6 +48,16 @@ flush_icache: bltu r4, r5, 1b ret + .global flush_dcache_range + +flush_dcache_range: + movhi r8, %hi(CONFIG_SYS_DCACHELINE_SIZE) + ori r8, r8, %lo(CONFIG_SYS_DCACHELINE_SIZE) +0: flushd 0(r4) + add r4, r4, r8 + bltu r4, r5, 0b + ret + .global flush_cache flush_cache: