On Monday 30 April 2012 11:32:21 Anatolij Gustschin wrote:
> On Sat, 28 Apr 2012 14:16:39 -0400 Mike Frysinger wrote:
> > On Saturday 28 April 2012 11:04:07 Anatolij Gustschin wrote:
> > > +static int cfb_fb_is_in_dram(void)
> > > +{
> > > + bd_t *bd = gd->bd;
> > > + ulong start, end;
> > > + int i;
> > > +
> > > + for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
> > > +#if defined(CONFIG_ARM) || defined(CONFIG_AVR32) ||
> > > defined(COFNIG_NDS32)
> > >
> > > || \ +defined(CONFIG_SANDBOX) || defined(CONFIG_X86)
> > >
> > > + start = bd->bi_dram[i].start;
> > > + end = bd->bi_dram[i].start + bd->bi_dram[i].size - 1;
> > > +#else
> > > + start = bd->bi_memstart;
> > > + end = bd->bi_memsize;
> > > +#endif
> > > +
> > > + if ((ulong)video_fb_address >= start &&
> > > + (ulong)video_fb_address < end)
> > > + return 1;
> > > + }
> > > + return 0;
> > > +}
> >
> > is this necessary ? the cache funcs should take care of this
> > automatically.
>
> Currently they don't, or at least on some architectures. Or did you mean
> that the cache instructions should take care of this?imo, cache flush functions should be safe to call on any memory address (where there is data that could be dma-ed from). this is how Linux works. otherwise, this function ends up getting duplicated in many places and i can't possibly see how that's an improvement. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

