diff options
Diffstat (limited to 'drivers/usb/host/ehci-omap.c')
-rw-r--r-- | drivers/usb/host/ehci-omap.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 17cfb8a1131c..c30435499a02 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c | |||
@@ -281,14 +281,13 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
281 | } | 281 | } |
282 | } | 282 | } |
283 | 283 | ||
284 | /* Hold PHYs in reset while initializing EHCI controller */ | ||
284 | if (pdata->phy_reset) { | 285 | if (pdata->phy_reset) { |
285 | if (gpio_is_valid(pdata->reset_gpio_port[0])) | 286 | if (gpio_is_valid(pdata->reset_gpio_port[0])) |
286 | gpio_request_one(pdata->reset_gpio_port[0], | 287 | gpio_set_value_cansleep(pdata->reset_gpio_port[0], 0); |
287 | GPIOF_OUT_INIT_LOW, "USB1 PHY reset"); | ||
288 | 288 | ||
289 | if (gpio_is_valid(pdata->reset_gpio_port[1])) | 289 | if (gpio_is_valid(pdata->reset_gpio_port[1])) |
290 | gpio_request_one(pdata->reset_gpio_port[1], | 290 | gpio_set_value_cansleep(pdata->reset_gpio_port[1], 0); |
291 | GPIOF_OUT_INIT_LOW, "USB2 PHY reset"); | ||
292 | 291 | ||
293 | /* Hold the PHY in RESET for enough time till DIR is high */ | 292 | /* Hold the PHY in RESET for enough time till DIR is high */ |
294 | udelay(10); | 293 | udelay(10); |
@@ -330,6 +329,11 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
330 | omap_ehci->hcs_params = readl(&omap_ehci->caps->hcs_params); | 329 | omap_ehci->hcs_params = readl(&omap_ehci->caps->hcs_params); |
331 | 330 | ||
332 | ehci_reset(omap_ehci); | 331 | ehci_reset(omap_ehci); |
332 | ret = usb_add_hcd(hcd, irq, IRQF_SHARED); | ||
333 | if (ret) { | ||
334 | dev_err(dev, "failed to add hcd with err %d\n", ret); | ||
335 | goto err_add_hcd; | ||
336 | } | ||
333 | 337 | ||
334 | if (pdata->phy_reset) { | 338 | if (pdata->phy_reset) { |
335 | /* Hold the PHY in RESET for enough time till | 339 | /* Hold the PHY in RESET for enough time till |
@@ -344,12 +348,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
344 | gpio_set_value_cansleep(pdata->reset_gpio_port[1], 1); | 348 | gpio_set_value_cansleep(pdata->reset_gpio_port[1], 1); |
345 | } | 349 | } |
346 | 350 | ||
347 | ret = usb_add_hcd(hcd, irq, IRQF_SHARED); | ||
348 | if (ret) { | ||
349 | dev_err(dev, "failed to add hcd with err %d\n", ret); | ||
350 | goto err_add_hcd; | ||
351 | } | ||
352 | |||
353 | /* root ports should always stay powered */ | 351 | /* root ports should always stay powered */ |
354 | ehci_port_power(omap_ehci, 1); | 352 | ehci_port_power(omap_ehci, 1); |
355 | 353 | ||