summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/ehci-hcd.c13
-rw-r--r--include/usb/ehci.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 8995fa3c44..1c266f3002 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));
diff --git a/include/usb/ehci.h b/include/usb/ehci.h
index 3304b60279..2ec862c84b 100644
--- a/include/usb/ehci.h
+++ b/include/usb/ehci.h
@@ -5,6 +5,8 @@
struct ehci_platform_data {
unsigned long flags;
+ unsigned long hccr_offset;
+ unsigned long hcor_offset;
};
#endif /* __USB_EHCI_H */