[U-Boot] [PATCH] net: fec: Avoid MX28 bus sync issue

Wolfgang Denk wd at denx.de
Fri Sep 13 19:46:52 CEST 2013


Dear Marek Vasut,

In message <201309131824.52506.marex at denx.de> you wrote:
> 
> > > -       uchar buff[FEC_MAX_PKT_SIZE] __aligned(ARCH_DMA_MINALIGN);
> > > +       /* Align the receive buffer */
> > > +       uchar buff_unaligned[FEC_MAX_PKT_SIZE + (ARCH_DMA_MINALIGN - 1)];
> > > +       uchar *buff = ((uint32_t)buff_unaligned + (ARCH_DMA_MINALIGN -
> > > 1)) & ~(ARCH_DMA_MINALIGN - 1);
> > 
> > You should use the ALIGN() macro here.
> 
> We already have this stuff in include/common.h ... ALLOC_CACHE_ALIGNED_BUFFER it 
> is called IIRC

That's ALLOC_CACHE_ALIGN_BUFFER.   Thanks.

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
Anyone who isn't confused here doesn't really know what's going on.


More information about the U-Boot mailing list