]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
9d6c717104dafb7679154fc3d4cb6697d5e1511f
[thirdparty/kernel/stable-queue.git] /
1 From b01ff5cb2fc99d45e4edc97077b6e17186570a16 Mon Sep 17 00:00:00 2001
2 From: Roger Quadros <rogerq@ti.com>
3 Date: Tue, 7 Oct 2014 09:40:57 -0500
4 Subject: Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete"
5
6 From: Roger Quadros <rogerq@ti.com>
7
8 commit b01ff5cb2fc99d45e4edc97077b6e17186570a16 upstream.
9
10 This reverts commit 02dae36aa649a66c5c6181157ddd806e7b4913fc.
11
12 That commit is bogus in two ways:
13
14 1) There's no way dwc3-omap's ->suspend() can cause any effect
15 on xhci's ->suspend(). Linux device driver model guarantees
16 that a parent's ->suspend() will only be called after all
17 children are suspended. dwc3-omap is the parent of the
18 parent of xhci.
19
20 2) When implementing Deep Sleep states where context is lost,
21 USBOTGSS_IRQ0 register, well, looses context so we
22 _must_ rewrite it otherwise core IRQs will never be
23 reenabled and USB will appear to be dead.
24
25 Fixes: 02dae36 (usb: dwc3: dwc3-omap: Disable/Enable only
26 wrapper interrupts in prepare/complete)
27 Cc: George Cherian <george.cherian@ti.com>
28 Signed-off-by: Roger Quadros <rogerq@ti.com>
29 Signed-off-by: Felipe Balbi <balbi@ti.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31
32 ---
33 drivers/usb/dwc3/dwc3-omap.c | 15 ++-------------
34 1 file changed, 2 insertions(+), 13 deletions(-)
35
36 --- a/drivers/usb/dwc3/dwc3-omap.c
37 +++ b/drivers/usb/dwc3/dwc3-omap.c
38 @@ -599,7 +599,7 @@ static int dwc3_omap_prepare(struct devi
39 {
40 struct dwc3_omap *omap = dev_get_drvdata(dev);
41
42 - dwc3_omap_write_irqmisc_set(omap, 0x00);
43 + dwc3_omap_disable_irqs(omap);
44
45 return 0;
46 }
47 @@ -607,19 +607,8 @@ static int dwc3_omap_prepare(struct devi
48 static void dwc3_omap_complete(struct device *dev)
49 {
50 struct dwc3_omap *omap = dev_get_drvdata(dev);
51 - u32 reg;
52
53 - reg = (USBOTGSS_IRQMISC_OEVT |
54 - USBOTGSS_IRQMISC_DRVVBUS_RISE |
55 - USBOTGSS_IRQMISC_CHRGVBUS_RISE |
56 - USBOTGSS_IRQMISC_DISCHRGVBUS_RISE |
57 - USBOTGSS_IRQMISC_IDPULLUP_RISE |
58 - USBOTGSS_IRQMISC_DRVVBUS_FALL |
59 - USBOTGSS_IRQMISC_CHRGVBUS_FALL |
60 - USBOTGSS_IRQMISC_DISCHRGVBUS_FALL |
61 - USBOTGSS_IRQMISC_IDPULLUP_FALL);
62 -
63 - dwc3_omap_write_irqmisc_set(omap, reg);
64 + dwc3_omap_enable_irqs(omap);
65 }
66
67 static int dwc3_omap_suspend(struct device *dev)