[U-Boot] [PATCH 2/2] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
Ilya Yanok
ilya.yanok at cogentembedded.com
Sun Jul 8 12:04:31 CEST 2012
Hi Marek,
On Sun, Jul 8, 2012 at 7:08 AM, Marek Vasut <marex at denx.de> wrote:
[...]
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index 04300be..5199560 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -34,7 +34,10 @@ struct ehci_hccr *hccr; /* R/O registers, not need
> for volatile */
> volatile struct ehci_hcor *hcor;
>
> static uint16_t portreset;
> -static struct QH qh_list __attribute__((aligned(32)));
> +DEFINE_CACHE_ALIGN_BUFFER(struct QH, qh_list, 1);
>
This will align on ARCH_DMA_MINALIGN, not USB_DMA_MINALIGN. In case of
ARCH_DMA_MINALIGN < 32 we will loose the 32-byte alignment required by USB
spec.
The same with other buffers. Otherwise looks great.
Regards, Ilya.
More information about the U-Boot
mailing list