diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-06-23 15:29:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-06-24 11:41:15 +0200 |
commit | 57b56a989fb0071382832c9e7263e48057314e6c (patch) | |
tree | 2557166b0d4a9b70e0a52198c89db26fb5fd6d20 /drivers | |
parent | 334fe1dc8a1b866d1f0f4ccf82ff7b06589ec022 (diff) | |
download | barebox-57b56a989fb0071382832c9e7263e48057314e6c.tar.gz barebox-57b56a989fb0071382832c9e7263e48057314e6c.tar.xz |
ehci: Make has_tt configurable via platform data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/usb_ehci_core.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/usb/usb_ehci_core.c b/drivers/usb/usb_ehci_core.c index d7efaadb8c..f3611cda2f 100644 --- a/drivers/usb/usb_ehci_core.c +++ b/drivers/usb/usb_ehci_core.c @@ -31,6 +31,7 @@ #include <xfuncs.h> #include <clock.h> #include <errno.h> +#include <usb/ehci.h> #include <asm/mmu.h> #include "usb_ehci.h" @@ -43,6 +44,7 @@ struct ehci_priv { struct QH *qh_list; void *qhp; int portreset; + unsigned long flags; }; #define to_ehci(ptr) container_of(ptr, struct ehci_priv, host) @@ -112,13 +114,8 @@ static struct descriptor { 255 /* bInterval */ }, }; -#define CONFIG_EHCI_IS_TDI // FIXME -#if defined(CONFIG_EHCI_IS_TDI) -#define ehci_is_TDI() (1) -#else -#define ehci_is_TDI() (0) -#endif +#define ehci_is_TDI() (ehci->flags & EHCI_HAS_TT) #ifdef CONFIG_MMU /* @@ -861,10 +858,19 @@ static int ehci_probe(struct device_d *dev) struct usb_host *host; struct ehci_priv *ehci; uint32_t reg; + struct ehci_platform_data *pdata = dev->platform_data; ehci = xmalloc(sizeof(struct ehci_priv)); host = &ehci->host; + if (pdata) + ehci->flags = pdata->flags; + else + /* default to EHCI_HAS_TT to not change behaviour of boards + * with platform_data + */ + ehci->flags = EHCI_HAS_TT; + host->init = ehci_init; host->submit_int_msg = submit_int_msg; host->submit_control_msg = submit_control_msg; |