diff options
author | Roger Quadros <rogerq@ti.com> | 2014-10-07 10:40:57 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-10-23 10:55:41 -0400 |
commit | b01ff5cb2fc99d45e4edc97077b6e17186570a16 (patch) | |
tree | 37086d710f2f638ee00bfae172c9bbe4c6047c25 | |
parent | a6615937bcd9234e6d6bb817c3701fce44d0a84d (diff) |
Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete"
This reverts commit 02dae36aa649a66c5c6181157ddd806e7b4913fc.
That commit is bogus in two ways:
1) There's no way dwc3-omap's ->suspend() can cause any effect
on xhci's ->suspend(). Linux device driver model guarantees
that a parent's ->suspend() will only be called after all
children are suspended. dwc3-omap is the parent of the
parent of xhci.
2) When implementing Deep Sleep states where context is lost,
USBOTGSS_IRQ0 register, well, looses context so we
_must_ rewrite it otherwise core IRQs will never be
reenabled and USB will appear to be dead.
Fixes: 02dae36 (usb: dwc3: dwc3-omap: Disable/Enable only
wrapper interrupts in prepare/complete)
Cc: <stable@vger.kernel.org> # v3.17
Cc: George Cherian <george.cherian@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/dwc3-omap.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 2f537d588225..a0aa9f3da441 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -597,7 +597,7 @@ static int dwc3_omap_prepare(struct device *dev) | |||
597 | { | 597 | { |
598 | struct dwc3_omap *omap = dev_get_drvdata(dev); | 598 | struct dwc3_omap *omap = dev_get_drvdata(dev); |
599 | 599 | ||
600 | dwc3_omap_write_irqmisc_set(omap, 0x00); | 600 | dwc3_omap_disable_irqs(omap); |
601 | 601 | ||
602 | return 0; | 602 | return 0; |
603 | } | 603 | } |
@@ -605,19 +605,8 @@ static int dwc3_omap_prepare(struct device *dev) | |||
605 | static void dwc3_omap_complete(struct device *dev) | 605 | static void dwc3_omap_complete(struct device *dev) |
606 | { | 606 | { |
607 | struct dwc3_omap *omap = dev_get_drvdata(dev); | 607 | struct dwc3_omap *omap = dev_get_drvdata(dev); |
608 | u32 reg; | ||
609 | 608 | ||
610 | reg = (USBOTGSS_IRQMISC_OEVT | | 609 | dwc3_omap_enable_irqs(omap); |
611 | USBOTGSS_IRQMISC_DRVVBUS_RISE | | ||
612 | USBOTGSS_IRQMISC_CHRGVBUS_RISE | | ||
613 | USBOTGSS_IRQMISC_DISCHRGVBUS_RISE | | ||
614 | USBOTGSS_IRQMISC_IDPULLUP_RISE | | ||
615 | USBOTGSS_IRQMISC_DRVVBUS_FALL | | ||
616 | USBOTGSS_IRQMISC_CHRGVBUS_FALL | | ||
617 | USBOTGSS_IRQMISC_DISCHRGVBUS_FALL | | ||
618 | USBOTGSS_IRQMISC_IDPULLUP_FALL); | ||
619 | |||
620 | dwc3_omap_write_irqmisc_set(omap, reg); | ||
621 | } | 610 | } |
622 | 611 | ||
623 | static int dwc3_omap_suspend(struct device *dev) | 612 | static int dwc3_omap_suspend(struct device *dev) |