From: Thomas Chou Date: Thu, 10 Nov 2011 17:10:16 +0800 Subject: [U-Boot] [PATCH 3/3] nios2: add flush_dcache_range function In-Reply-To: <1320410288-15008-4-git-send-email-stefan.kristiansson@saunalahti.fi> References: <1320410288-15008-1-git-send-email-stefan.kristiansson@saunalahti.fi> <1320410288-15008-4-git-send-email-stefan.kristiansson@saunalahti.fi> Message-ID: <4EBB94F8.5070308@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/04/2011 08:38 PM, Stefan Kristiansson wrote: > exposes functionality to flush dcache according to > the common.h API > > Signed-off-by: Stefan Kristiansson > Cc: Thomas Chou > --- > arch/nios2/lib/cache.S | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > Hi Stefan, Applied to nios next branch. Thanks. Best regards, Thomas > diff --git a/arch/nios2/lib/cache.S b/arch/nios2/lib/cache.S > index ee3b4b7..b952d0c 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: