Skip to content

Commit

Permalink
USB: EHCI: OMAP: Finish ehci omap phy reset cycle before adding hcd.
Browse files Browse the repository at this point in the history
'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d) created a regression
with Beagleboard xM if booting the kernel after running 'usb start' under u-boot.

Finishing the reset before calling 'usb_add_hcd' fixes the regression. This is most likely due to
usb_add_hcd calling the driver's reset and init functions which expect the hardware to be
up and running.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: stable <stable@vger.kernel.org> [3.4]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Russ Dill authored and Greg Kroah-Hartman committed May 5, 2012
1 parent 3cccc29 commit 3aa2ae7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/usb/host/ehci-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)

ehci_reset(omap_ehci);

ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret) {
dev_err(dev, "failed to add hcd with err %d\n", ret);
goto err_add_hcd;
}

/* root ports should always stay powered */
ehci_port_power(omap_ehci, 1);

if (pdata->phy_reset) {
/* Hold the PHY in RESET for enough time till
* PHY is settled and ready
Expand All @@ -264,6 +255,15 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
gpio_set_value(pdata->reset_gpio_port[1], 1);
}

ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret) {
dev_err(dev, "failed to add hcd with err %d\n", ret);
goto err_add_hcd;
}

/* root ports should always stay powered */
ehci_port_power(omap_ehci, 1);

return 0;

err_add_hcd:
Expand Down

0 comments on commit 3aa2ae7

Please sign in to comment.