diff options
-rw-r--r-- | drivers/usb/host/ehci-ath79.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-ath79.c b/drivers/usb/host/ehci-ath79.c index 98cc8a13169c..aa248c2f2c60 100644 --- a/drivers/usb/host/ehci-ath79.c +++ b/drivers/usb/host/ehci-ath79.c | |||
@@ -44,7 +44,6 @@ static int ehci_ath79_init(struct usb_hcd *hcd) | |||
44 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 44 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
45 | struct platform_device *pdev = to_platform_device(hcd->self.controller); | 45 | struct platform_device *pdev = to_platform_device(hcd->self.controller); |
46 | const struct platform_device_id *id; | 46 | const struct platform_device_id *id; |
47 | int hclength; | ||
48 | int ret; | 47 | int ret; |
49 | 48 | ||
50 | id = platform_get_device_id(pdev); | 49 | id = platform_get_device_id(pdev); |
@@ -53,20 +52,23 @@ static int ehci_ath79_init(struct usb_hcd *hcd) | |||
53 | return -EINVAL; | 52 | return -EINVAL; |
54 | } | 53 | } |
55 | 54 | ||
56 | hclength = HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); | ||
57 | switch (id->driver_data) { | 55 | switch (id->driver_data) { |
58 | case EHCI_ATH79_IP_V1: | 56 | case EHCI_ATH79_IP_V1: |
59 | ehci->has_synopsys_hc_bug = 1; | 57 | ehci->has_synopsys_hc_bug = 1; |
60 | 58 | ||
61 | ehci->caps = hcd->regs; | 59 | ehci->caps = hcd->regs; |
62 | ehci->regs = hcd->regs + hclength; | 60 | ehci->regs = hcd->regs + |
61 | HC_LENGTH(ehci, | ||
62 | ehci_readl(ehci, &ehci->caps->hc_capbase)); | ||
63 | break; | 63 | break; |
64 | 64 | ||
65 | case EHCI_ATH79_IP_V2: | 65 | case EHCI_ATH79_IP_V2: |
66 | hcd->has_tt = 1; | 66 | hcd->has_tt = 1; |
67 | 67 | ||
68 | ehci->caps = hcd->regs + 0x100; | 68 | ehci->caps = hcd->regs + 0x100; |
69 | ehci->regs = hcd->regs + 0x100 + hclength; | 69 | ehci->regs = hcd->regs + 0x100 + |
70 | HC_LENGTH(ehci, | ||
71 | ehci_readl(ehci, &ehci->caps->hc_capbase)); | ||
70 | break; | 72 | break; |
71 | 73 | ||
72 | default: | 74 | default: |