aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGrigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>2018-08-29 21:02:28 +0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-10-02 10:50:34 +0300
commit4abe453750db8ada8b0a56c45c89ab18920e9a80 (patch)
treeafe4a2d70ed84bbc846677c7f17b5daf949c1755 /drivers/usb
parentusb: dwc2: gadget: Program GREFCLK register (diff)
downloadlinux-dev-4abe453750db8ada8b0a56c45c89ab18920e9a80.tar.xz
linux-dev-4abe453750db8ada8b0a56c45c89ab18920e9a80.zip
usb: dwc2: gadget: enable WKUP_ALERT interrupt
WKUP_ALERT interrupt should be unmask when lpm mode is enabled. This interrupt is asserted when the device is in L1 for the duration mentioned in GREFCLK.SOF_CNN_WKUP_ALERT. This is used to alert SW to initiate Remote wake up so that the device resumes in time in order not to lose sync with the host frame number. Acked-by: Minas Harutyunyan <hminas@synopsys.com> Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc2/gadget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index e8dd6897e2c3..24bd9fdabc67 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -5003,6 +5003,10 @@ void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg)
val |= hsotg->params.besl ? GLPMCFG_ENBESL : 0;
dwc2_writel(hsotg, val, GLPMCFG);
dev_dbg(hsotg->dev, "GLPMCFG=0x%08x\n", dwc2_readl(hsotg, GLPMCFG));
+
+ /* Unmask WKUP_ALERT Interrupt */
+ if (hsotg->params.service_interval)
+ dwc2_set_bit(hsotg, GINTMSK2, GINTMSK2_WKUP_ALERT_INT_MSK);
}
/**