From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 14 Jun 2012 21:41:08 +0200 Subject: [U-Boot] [PATCH 3/4] ehci-hcd.c: Add a new USB_DMA_MINALIGN define for cache alignment In-Reply-To: <4FDA3BBC.8060205@ti.com> References: <1339700507-26700-1-git-send-email-trini@ti.com> <201206142129.10207.marex@denx.de> <4FDA3BBC.8060205@ti.com> Message-ID: <201206142141.08439.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Tom Rini, > On 06/14/2012 12:29 PM, Marek Vasut wrote: > > Dear Tom Rini, > > > >> 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. > >> > >> Cc: Marek Vasut > >> Signed-off-by: Tom Rini > >> --- > >> > >> drivers/usb/host/ehci-hcd.c | 23 +++++++++++++++++------ > >> 1 file changed, 17 insertions(+), 6 deletions(-) > >> > >> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > >> index 04300be..45725f5 100644 > >> --- a/drivers/usb/host/ehci-hcd.c > >> +++ b/drivers/usb/host/ehci-hcd.c > >> @@ -29,12 +29,23 @@ > >> > >> #include "ehci.h" > >> > >> -int rootdev; > >> -struct ehci_hccr *hccr; /* R/O registers, not need for volatile */ > >> -volatile struct ehci_hcor *hcor; > >> +/* > >> + * The EHCI spec says that we must align to at least 32 bytes. > >> However, + * some platforms require larger alignment. > >> + */ > >> +#if ARCH_DMA_MINALIGN > 32 > >> +#define USB_DMA_MINALIGN ARCH_DMA_MINALIGN > >> +#else > >> +#define USB_DMA_MINALIGN 32 > >> +#endif > > > > Don't we have some common header for these? > > For ECHI and musb? I did not spot one unless we go all the way up to > common.h or similar. Ok, that's crappy :-/ Don't we have ehci.h or usb.h? Is musb ehci or not? Best regards, Marek Vasut