summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-07-20 09:12:43 +0200
committerWolfgang Denk <wd@denx.de>2012-07-20 09:12:43 +0200
commit3ec81d758c09d6887a77a1b1259d044a2905bc8e (patch)
treef86e0095994be54d6a94c01c7dd5d977d56e0fce /include/usb.h
parentad8439d4645200b5a4f230dd07b73ae956b88c1e (diff)
parent1b4bd0e66cd3b5124669c78bc968510b1040e9d9 (diff)
downloadu-boot-imx-3ec81d758c09d6887a77a1b1259d044a2905bc8e.zip
u-boot-imx-3ec81d758c09d6887a77a1b1259d044a2905bc8e.tar.gz
u-boot-imx-3ec81d758c09d6887a77a1b1259d044a2905bc8e.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-usb
* 'master' of git://git.denx.de/u-boot-usb: usb_storage: fix ehci driver max transfer size smsc95xx: align buffers to cache line size ehci-hcd: change debug() to printf() in case of errors usb: check return value of submit_{control, bulk}_msg usb: pass cache-aligned buffer to usb_get_descriptor() ehci-hcd: fix external buffer cache handling ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment ehci-hcd: program asynclistaddr before every transfer common.h: Introduce DEFINE_CACHE_ALIGN_BUFFER ehci-omap: Do not call dcache_off from omap_ehci_hcd_init Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h
index 6da91e7..ba3d169 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -29,6 +29,16 @@
#include <usb_defs.h>
#include <usbdescriptors.h>
+/*
+ * 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
+
/* Everything is aribtrary */
#define USB_ALTSETTINGALLOC 4
#define USB_MAXALTSETTING 128 /* Hard limit */