[U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
Tom Rini
trini at ti.com
Thu Jul 5 19:15:23 CEST 2012
On Wed, Jul 04, 2012 at 05:03:59PM +0400, Ilya Yanok wrote:
`
> From: Tom Rini <trini at ti.com>
>
> The USB spec says that 32 bytes is the minimum required alignment.
> However on some platforms we have a larger minimum requirement for cache
> coherency. In those cases, use that value rather than the USB spec
> minimum. We add a cpp check to <usb.h> to define USB_DMA_MINALIGN and
> make use of it in ehci-hcd.c and musb_core.h. We cannot use MAX() here
> as we are not allowed to have tests inside of align(...).
>
> Cc: Marek Vasut <marex at denx.de>
> Signed-off-by: Tom Rini <trini at ti.com>
> [ilya.yanok]: fix size alignment, drop (incorrect) rounding
> when invalidating the buffer. If we got unaligned buffer from the
> upper layer -- that's definetely a bug so it's good to buzz
> about it. But we have to align the buffer length -- upper layers
> should take care to reserve enough space.
> Signed-off-by: Ilya Yanok <ilya.yanok at cogentembedded.com>
So trying this on ethernet still gives a handful of unaligned areas. Do
you have a beagleboard xM available?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120705/7c256a75/attachment.pgp>
More information about the U-Boot
mailing list