summaryrefslogtreecommitdiff
path: root/drivers/usb/usb_ehci_fsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/usb_ehci_fsl.c')
-rw-r--r--drivers/usb/usb_ehci_fsl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/usb_ehci_fsl.c b/drivers/usb/usb_ehci_fsl.c
index 9ca6c56..81d5d21 100644
--- a/drivers/usb/usb_ehci_fsl.c
+++ b/drivers/usb/usb_ehci_fsl.c
@@ -43,7 +43,8 @@ int ehci_hcd_init(void)
addr = (uint32_t)&(im->usb[0]);
hccr = (struct ehci_hccr *)(addr + FSL_SKIP_PCI);
- hcor = (struct ehci_hcor *)((uint32_t) hccr + hccr->cr_caplength);
+ hcor = (struct ehci_hcor *)((uint32_t) hccr +
+ HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
/* Configure clock */
clrsetbits_be32(&(im->clk.sccr), MPC83XX_SCCR_USB_MASK,