usb: dwc2: host: ignore wakeup interrupt if hibernation supported
authorGregory Herrero <[email protected]>
Tue, 22 Sep 2015 13:16:43 +0000 (15:16 +0200)
committerFelipe Balbi <[email protected]>
Thu, 1 Oct 2015 17:40:16 +0000 (12:40 -0500)
If hibernation is supported, resume of devices will be handled in
bus_resume callback.

Signed-off-by: Gregory Herrero <[email protected]>
Signed-off-by: Mian Yousaf Kaukab <[email protected]>
Tested-by: Robert Baldyga <[email protected]>
Tested-by: Dinh Nguyen <[email protected]>
Tested-by: John Youn <[email protected]>
Acked-by: John Youn <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
drivers/usb/dwc2/core_intr.c

index 3275310a8fb395f9862712134db9e849dc23ed10..d8a5400a2d2db199cdfe373e562207d6f66e32bb 100644 (file)
@@ -356,6 +356,10 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
                /* Change to L0 state */
                hsotg->lx_state = DWC2_L0;
        } else {
+               if (hsotg->core_params->hibernation) {
+                       dwc2_writel(GINTSTS_WKUPINT, hsotg->regs + GINTSTS);
+                       return;
+               }
                if (hsotg->lx_state != DWC2_L1) {
                        u32 pcgcctl = dwc2_readl(hsotg->regs + PCGCTL);