[U-Boot] [PATCH] tegra2: Enable data cache
Marek Vasut
marek.vasut at gmail.com
Fri Sep 9 02:30:54 CEST 2011
On Friday, September 09, 2011 02:25:46 AM Mike Frysinger wrote:
> On Thursday, September 08, 2011 18:20:16 Simon Glass wrote:
> > --- a/board/nvidia/common/board.c
> > +++ b/board/nvidia/common/board.c
> > @@ -307,3 +307,11 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
> >
> > return 0;
> >
> > }
> > #endif
> >
> > +
> > +#ifndef CONFIG_SYS_DCACHE_OFF
> > +void enable_caches(void)
> > +{
> > + /* Enable D-cache. I-cache is already enabled in start.S */
> > + dcache_enable();
> > +}
> > +#endif
>
> not specific to your patch, but this seems kind of dumb to copy & paste the
> same thing between all the arm sub arches/boards. why cant the default
> enable_caches() look like this for arm:
> void enable_caches(void)
> {
> #ifndef CONFIG_SYS_DCACHE_OFF
> dcache_enable();
> #endif
> #ifndef CONFIG_SYS_ICACHE_OFF
> icache_enable();
> #endif
> }
> -mike
Makes sense ... and also, we won't eventually need this "enable_caches()" at all
in cpu-directories. It can then be moved to lib/.
More information about the U-Boot
mailing list