Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: EHCI: OMAP: Finish ehci omap phy reset cycle before adding hcd.

'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d0f) 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>

authored by

Russ Dill and committed by
Greg Kroah-Hartman
3aa2ae74 3cccc292

+9 -9
+9 -9
drivers/usb/host/ehci-omap.c
··· 242 242 243 243 ehci_reset(omap_ehci); 244 244 245 - ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 246 - if (ret) { 247 - dev_err(dev, "failed to add hcd with err %d\n", ret); 248 - goto err_add_hcd; 249 - } 250 - 251 - /* root ports should always stay powered */ 252 - ehci_port_power(omap_ehci, 1); 253 - 254 245 if (pdata->phy_reset) { 255 246 /* Hold the PHY in RESET for enough time till 256 247 * PHY is settled and ready ··· 254 263 if (gpio_is_valid(pdata->reset_gpio_port[1])) 255 264 gpio_set_value(pdata->reset_gpio_port[1], 1); 256 265 } 266 + 267 + ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 268 + if (ret) { 269 + dev_err(dev, "failed to add hcd with err %d\n", ret); 270 + goto err_add_hcd; 271 + } 272 + 273 + /* root ports should always stay powered */ 274 + ehci_port_power(omap_ehci, 1); 257 275 258 276 return 0; 259 277