[U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

Lukasz Majewski majess1982 at gmail.com
Wed Aug 24 21:18:12 CEST 2011


On Wed, 24 Aug 2011 11:25:42 -0700
Anton Staaf <robotboy at google.com> wrote:

> On Wed, Aug 24, 2011 at 11:12 AM, Wolfgang Denk <wd at denx.de> wrote:
> > Dear Anton Staaf,
> >
> > In message
> > <CAF6FioWBsjFa+QdFNHEQGO50eLoqZMc--Yt3-iYX6DWr=hcOrg at mail.gmail.com>
> > you wrote:
> >>
> >> >> 4. get_dcache_line_size() can be simply defined as
> >> >> #define get_dcache_line_size() CONFIG_SYS_CACHE_LINE_SIZE if we
> >> >> _really_ want to save a few bytes.
> >> >
> >> > Actually I fail to understand why we would ever need
> >> > get_dcache_line_size() in a boot loader.
> >>
> >> It is required so that we can correctly allocate buffers that will
> >> be used by DMA engines to read or write data.  The reason that
> >> these
> >
> > No, it is definitely NOT needed for this purpose - we have been
> > using CONFIG_SYS_CACHE_LINE_SIZE for more than a decade without
> > problems, so I don't really understand why we now would need a new
> > function for this?
> 

Ok, so one problem solved :-).

> Ahh, I misunderstood your question.  I thought you were asking about
> the need to know the cache line size.  Not it's specific
> implementation as a function call.  In which case, I agree, and am
> happy to use CONFIG_SYS_CACHE_LINE_SIZE, though I don't see any
> definitions of CONFIG_SYS_CACHE_LINE_SIZE in the entire U-Boot tree.
> What have I missed?
> 

There are some similar definitions:
./include/configs/atstk1006.h:#define CONFIG_SYS_DCACHE_LINESZ 32
./include/configs/atngw100.h:#define CONFIG_SYS_DCACHE_LINESZ 32
./include/configs/favr-32-ezkit.h:#define
CONFIG_SYS_DCACHE_LINESZ 32


> Thanks,
>     Anton
> 
> >
> > Best regards,
> >
> > Wolfgang Denk
> >
> > --
> > DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev
> > Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
> > (+49)-8142-66989-80 Email: wd at denx.de Brain: an apparatus with
> > which we think we think.    - Ambrose Bierce
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Regards,
Lukasz Majewski


More information about the U-Boot mailing list