aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-03-28 15:31:47 -0400
committerFelipe Balbi <balbi@ti.com>2014-04-15 13:07:33 -0400
commit3063a12be2b07c64e9802708a19489342e64c1a3 (patch)
tree4e6d225a2bc7aadc6108c6a826937478587e4010 /drivers/usb/musb/omap2430.c
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
usb: musb: fix PHY power on/off
commi 30a70b0 (usb: musb: fix obex in g_nokia.ko causing kernel panic) removed phy_power_on() and phy_power_off() calls from runtime PM callbacks but it failed to note that the driver depended on pm_runtime_get_sync() calls to power up the PHY, thus leaving some platforms without any means to have a working PHY. Fix that by enabling the phy during omap2430_musb_init() and killing it in omap2430_musb_exit(). Fixes: 30a70b0 (usb: musb: fix obex in g_nokia.ko causing kernel panic) Cc: <stable@vger.kernel.org> # v3.14 Cc: Pali Rohár <pali.rohar@gmail.com> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Reported-by: Michael Scott <hashcode0f@gmail.com> Tested-by: Michael Scott <hashcode0f@gmail.com> Tested-by: Stefan Roese <sr@denx.de> Reported-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index d341c149a2f9..819a7cdcb866 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -416,6 +416,7 @@ static int omap2430_musb_init(struct musb *musb)
416 omap_musb_set_mailbox(glue); 416 omap_musb_set_mailbox(glue);
417 417
418 phy_init(musb->phy); 418 phy_init(musb->phy);
419 phy_power_on(musb->phy);
419 420
420 pm_runtime_put_noidle(musb->controller); 421 pm_runtime_put_noidle(musb->controller);
421 return 0; 422 return 0;
@@ -478,6 +479,7 @@ static int omap2430_musb_exit(struct musb *musb)
478 del_timer_sync(&musb_idle_timer); 479 del_timer_sync(&musb_idle_timer);
479 480
480 omap2430_low_level_exit(musb); 481 omap2430_low_level_exit(musb);
482 phy_power_off(musb->phy);
481 phy_exit(musb->phy); 483 phy_exit(musb->phy);
482 484
483 return 0; 485 return 0;