[PATCH 3/3] USB: musb: omap: Enable MUSB clocks before xceiver resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enable MUSB clocks before the xceiver resume is called.
As soon as xceiver resume is called, xceiver communicates an
interrupt to MUSB over ULPI bus and the interrupt handler crashes
as the clocks are not enabled on going to resume.

So enable the MUSB clocks so that its ready to handle interrupts
from the xceiver

Signed-off-by: Vikram Pandita <vikram.pandita@xxxxxx>
---
 drivers/usb/musb/omap2430.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index ea7a798..67dabe1 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -286,13 +286,18 @@ int musb_platform_resume(struct musb *musb)
 	if (!musb->clock)
 		return 0;
 
-	otg_set_suspend(otg_get_transceiver(), 0);
-
+	/* Keep MUSB clock enabled
+	 * this is needed when phy xvr is enabled, MUSB gets
+	 * an interrupt and system crashes.
+	 * So enable clock before calling phy resume
+	 */
 	if (musb->set_clock)
 		musb->set_clock(musb->clock, 1);
 	else
 		clk_enable(musb->clock);
 
+	otg_set_suspend(otg_get_transceiver(), 0);
+
 	l = omap_readl(OTG_SYSCONFIG);
 	l &= ~ENABLEWAKEUP;	/* disable wakeup */
 	omap_writel(l, OTG_SYSCONFIG);
-- 
1.6.3.3.334.g916e1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux