Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Tom Rini
On Wed, Jul 04, 2012 at 05:03:59PM +0400, Ilya Yanok wrote: ` From: Tom Rini tr...@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

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Ilya Yanok
Hi Tom, On Thu, Jul 5, 2012 at 9:15 PM, Tom Rini tr...@ti.com wrote: On Wed, Jul 04, 2012 at 05:03:59PM +0400, Ilya Yanok wrote: ` From: Tom Rini tr...@ti.com The USB spec says that 32 bytes is the minimum required alignment. However on some platforms we have a larger minimum

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Ilya Yanok
Hi Marek, On Thu, Jul 5, 2012 at 12:24 AM, Marek Vasut ma...@denx.de wrote: -static struct QH qh_list __attribute__((aligned(32))); +static char __qh_list[ALIGN(sizeof(struct QH), USB_DMA_MINALIGN)] + __attribute__((aligned(USB_DMA_MINALIGN))); +static struct QH

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Marek Vasut
Dear Ilya Yanok, Hi Tom, On Thu, Jul 5, 2012 at 9:15 PM, Tom Rini tr...@ti.com wrote: On Wed, Jul 04, 2012 at 05:03:59PM +0400, Ilya Yanok wrote: ` From: Tom Rini tr...@ti.com The USB spec says that 32 bytes is the minimum required alignment. However on some platforms we

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Marek Vasut
Dear Ilya Yanok, Hi Marek, On Thu, Jul 5, 2012 at 12:24 AM, Marek Vasut ma...@denx.de wrote: -static struct QH qh_list __attribute__((aligned(32))); +static char __qh_list[ALIGN(sizeof(struct QH), USB_DMA_MINALIGN)] + __attribute__((aligned(USB_DMA_MINALIGN)));

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Ilya Yanok
Hi Marek, On Thu, Jul 5, 2012 at 11:58 PM, Marek Vasut ma...@denx.de wrote: Yep. I even thought about this but decided not to do... can't recall why. Now I think it's really a good idea. Maybe we should create DEFINE_ALIGNED_VARIABLE as a common.h macro? Like what's in common.h --

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-05 Thread Marek Vasut
Dear Ilya Yanok, Hi Marek, On Thu, Jul 5, 2012 at 11:58 PM, Marek Vasut ma...@denx.de wrote: Yep. I even thought about this but decided not to do... can't recall why. Now I think it's really a good idea. Maybe we should create DEFINE_ALIGNED_VARIABLE as a common.h macro?

[U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-04 Thread Ilya Yanok
From: Tom Rini tr...@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

Re: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-04 Thread Marek Vasut
Dear Ilya Yanok, From: Tom Rini tr...@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