On Wed, Oct 26, 2011 at 23:05, Ilya Yanok wrote:
> What do you think, how should we deal with it? Make all buffers
> alligned or implement bounce-buffering inside host driver?

since this is a common issue to most USB controllers, aligning the
buffers is probably best.  and should be relatively painless.

what's the code size before/after your change ?

> --- a/common/usb.c
> +++ b/common/usb.c
>
> -static struct devrequest setup_packet;
> +static uchar __setup_packet[ALIGN(sizeof(struct devrequest),
> +               ARCH_DMA_MINALIGN)]
> +               __aligned(ARCH_DMA_MINALIGN);
> +static struct devrequest * const setup_packet =
> +               (struct devrequest *)&__setup_packet;

i'm not sure about this.  why won't this work ?
static struct devrequest setup_packet __aligned(ARCH_DMA_MINALIGN);
-mike
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to