[U-Boot] [PATCH V3] net: fec_mxc: allow use with cache enabled

Mike Frysinger vapier at gentoo.org
Wed Mar 14 21:33:40 CET 2012


On Wednesday 14 March 2012 15:12:10 Eric Nelson wrote:
> On 03/13/2012 10:41 PM, Mike Frysinger wrote:
> > On Wednesday 14 March 2012 01:12:38 Eric Nelson wrote:
> >> Most of the PPC devices seem to have values of 16 or 32
> >> for ARCH_DMA_MINALIGN, but PPC64BRIDGE and E500MC would
> >> have a problem if their drivers don't implement a bounce
> >> buffer because PKTALIGN<  ARCH_DMA_MINALIGN.
> >> 
> >> (see arch/powerpc/include/asm/cache.h)
> >> 
> >> This condition is properly tested for in fec_mxc.c.
> > 
> > so fix this in common code instead of hacking around it in individual
> > drivers. seems to me that PKTALIGN should be defined to
> > ARCH_DMA_MINALIGN and ultimately removed.
> 
> I'm not in a position to test against MAKEALL, but it appears that all
> architectures have cache.h and define ARCH_DMA_MINALIGN

ARCH_DMA_MINALIGN is required.  if an arch/board omits it, they are broken and 
you need not worry about it.  we already have common code requiring int.

> --- a/include/net.h
> +++ b/include/net.h
> 
> -#define PKTALIGN       32
> +#define PKTALIGN       ARCH_DMA_MINALIGN

looks fine to me
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120314/660cd39a/attachment.pgp>


More information about the U-Boot mailing list