usb: dwc2: host: ignore wakeup interrupt if hibernation supported
authorGregory Herrero <gregory.herrero@intel.com>
Tue, 22 Sep 2015 13:16:43 +0000 (15:16 +0200)
committerFelipe Balbi <balbi@ti.com>
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 <gregory.herrero@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
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);