summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-08-04 11:59:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-08-06 19:17:22 +0200
commit50c7d68dd81c88eb010a0368fef2f0d4c416b708 (patch)
tree905bd71f8cf74bc55662a89455014b5d34046798 /drivers
parent5145e87c642f2609f55bcf51e6d12eefe7f05b8f (diff)
downloadbarebox-50c7d68dd81c88eb010a0368fef2f0d4c416b708.tar.gz
barebox-50c7d68dd81c88eb010a0368fef2f0d4c416b708.tar.xz
ehci: Make has_tt configurable via platform data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 8995fa3c4..1c266f300 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -899,22 +899,25 @@ static int ehci_probe(struct device_d *dev)
ehci = xmalloc(sizeof(struct ehci_priv));
host = &ehci->host;
- if (pdata)
+ if (pdata) {
ehci->flags = pdata->flags;
- else
+ ehci->hccr = (void *)(dev->map_base + pdata->hccr_offset);
+ ehci->hcor = (void *)(dev->map_base + pdata->hcor_offset);
+ }
+ else {
/* default to EHCI_HAS_TT to not change behaviour of boards
* with platform_data
*/
ehci->flags = EHCI_HAS_TT;
+ ehci->hccr = (void *)(dev->map_base + 0x100);
+ ehci->hcor = (void *)(dev->map_base + 0x140);
+ }
host->init = ehci_init;
host->submit_int_msg = submit_int_msg;
host->submit_control_msg = submit_control_msg;
host->submit_bulk_msg = submit_bulk_msg;
- ehci->hccr = (void *)(dev->map_base + 0x100);
- ehci->hcor = (void *)(dev->map_base + 0x140);
-
usb_register_host(host);
reg = HC_VERSION(ehci_readl(&ehci->hccr->cr_capbase));