From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Wu Date: Tue, 28 Jul 2015 13:06:40 +0800 Subject: [U-Boot] [PATCH v3 2/4] ARM: cache: add an empty stub function for invalidate/flush dcache In-Reply-To: References: <1437968418-21319-1-git-send-email-josh.wu@atmel.com> <1437968418-21319-3-git-send-email-josh.wu@atmel.com> <55B65CE4.2090309@freescale.com>, <55B6E627.9080508@atmel.com> Message-ID: <55B70DE0.5010700@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, York On 7/28/2015 12:24 PM, York Sun wrote: > Please search the same name function in the same file. yes, there still have flush_dcache_range() & invalidate_dcache_range() function defined in case of DCACHE is enabled (CONFIG_SYS_DCACHE_OFF is not defined). And in that case, the empty weak functions flush_dcache_range() & invalidate_dcache_range() in arch/arm/lib/cache.c will be ignored. It is an expect behavior. or did I miss something? Best Regards, Josh Wu > > York > > Sent from my cellphone > > > -------- Original message -------- > From: Josh Wu > Date:07/27/2015 19:17 (GMT-08:00) > To: Sun York-R58495 , U-Boot Mailing List , Marek Vasut , Tom Rini > Cc: Masahiro Yamada , Jeroen Hofstee , Valentine Barshak , Simon Glass > , Thierry Reding , Masahiro Yamada , Heiko Schocher , Albert Aribaud , > Nobuhiro Iwamatsu > Subject: Re: [PATCH v3 2/4] ARM: cache: add an empty stub function for > invalidate/flush dcache > > Hi, York > > On 7/28/2015 12:31 AM, York Sun wrote: > > > > On 07/26/2015 08:40 PM, Josh Wu wrote: > >> Since some driver like ohci, lcd used dcache functions. But some ARM > >> cpu don't implement the invalidate_dcache_range()/flush_dcache_range() > >> functions. > >> > >> To avoid compiling errors this patch adds an weak empty stub function > >> for all ARM cpu in arch/arm/lib/cache.c. > >> And ARM cpu still can implemnt its own cache functions on the cpu > folder. > >> > >> Signed-off-by: Josh Wu > >> --- > >> > >> Changes in v3: > >> - remove the same functions in the cpu/ files as they will use the weak > >> function provided in lib/cache.c > >> > >> Changes in v2: > >> - new added. > >> > > > > > >> diff --git a/arch/arm/cpu/armv8/cache_v8.c > b/arch/arm/cpu/armv8/cache_v8.c > >> index c5ec529..f8c17cc 100644 > >> --- a/arch/arm/cpu/armv8/cache_v8.c > >> +++ b/arch/arm/cpu/armv8/cache_v8.c > >> @@ -149,14 +149,6 @@ void flush_dcache_all(void) > >> { > >> } > >> > >> -void invalidate_dcache_range(unsigned long start, unsigned long stop) > >> -{ > >> -} > >> - > >> -void flush_dcache_range(unsigned long start, unsigned long stop) > >> -{ > >> -} > >> - > >> void dcache_enable(void) > >> { > >> } > > Are you sure about this change? > > This patch deletes those above empty functions so that the driver will > use the same weak empty functions in arch/arm/lib/cache.c, which is > added by this patch as well. > > > You are probably changing the wrong leg of the > > #if conditional code. > > I don't think so. Could give me more details about this? Thanks. > > Best Regards, > Josh Wu > > > > > York >