From 00ffcd7c4a9f3e022a99ff71451163b5fa0251b5 Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Wed, 13 Mar 2013 15:14:43 +0200 Subject: [PATCH] --- yaml --- r: 364351 b: refs/heads/master c: 49f092198f4fd2c70847de7151d33df08929af51 h: refs/heads/master i: 364349: 73011264d2891b061cb7ac98f9174ac384be3d4e 364347: ca3fef37a3c33c966e56383d8b57c293414f4500 364343: ce824d8462bf7a05c7d97c61df96503c36e32675 364335: 86c871f68355b1833976139c9f5507ec4a82cacf 364319: b1d4079dbd6af85e6cb67ab1fd5f91ee08606fec 364287: 034af96b57df450eb6a8acab04e9850878167a7f v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/ehci-omap.c | 32 ++++++++++++++---------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index e35ae8732b3a..b11efbf90c1a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a2f450ca88a394e282f09e5e16f9de60cd487f80 +refs/heads/master: 49f092198f4fd2c70847de7151d33df08929af51 diff --git a/trunk/drivers/usb/host/ehci-omap.c b/trunk/drivers/usb/host/ehci-omap.c index 1ba1df89a436..755b428019a1 100644 --- a/trunk/drivers/usb/host/ehci-omap.c +++ b/trunk/drivers/usb/host/ehci-omap.c @@ -90,26 +90,13 @@ static inline u32 ehci_read(void __iomem *base, u32 reg) static int omap_ehci_init(struct usb_hcd *hcd) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); - struct omap_hcd *omap = (struct omap_hcd *)ehci->priv; - int rc, i; - - /* Hold PHYs in reset while initializing EHCI controller */ - for (i = 0; i < omap->nports; i++) { - if (omap->phy[i]) - usb_phy_shutdown(omap->phy[i]); - } + int rc; /* we know this is the memory we want, no need to ioremap again */ ehci->caps = hcd->regs; rc = ehci_setup(hcd); - /* Bring PHYs out of reset */ - for (i = 0; i < omap->nports; i++) { - if (omap->phy[i]) - usb_phy_init(omap->phy[i]); - } - return rc; } @@ -219,9 +206,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) } omap->phy[i] = phy; - usb_phy_init(omap->phy[i]); - /* bring PHY out of suspend */ - usb_phy_set_suspend(omap->phy[i], 0); } pm_runtime_enable(dev); @@ -245,6 +229,20 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) goto err_pm_runtime; } + /* + * Bring PHYs out of reset. + * Even though HSIC mode is a PHY-less mode, the reset + * line exists between the chips and can be modelled + * as a PHY device for reset control. + */ + for (i = 0; i < omap->nports; i++) { + if (!omap->phy[i]) + continue; + + usb_phy_init(omap->phy[i]); + /* bring PHY out of suspend */ + usb_phy_set_suspend(omap->phy[i], 0); + } return 0;