@@ -512,8 +512,13 @@ static int dwc3_core_init(struct dwc3 *dwc)
reg &= ~DWC3_GCTL_DSBLCLKGTNG;
break;
case DWC3_GHWPARAMS1_EN_PWROPT_HIB:
- /* enable hibernation here */
dwc->nr_scratch = DWC3_GHWPARAMS4_HIBER_SCRATCHBUFS(hwparams4);
+ /*
+ * Enable hibernation here.
+ *
+ * Enabling this bit so that host-mode hibernation will
+ * work, device-mode hibernation is not implemented yet.
+ */
reg |= DWC3_GCTL_GBLHIBERNATIONEN;
break;
default:
@@ -2300,7 +2300,7 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
/*
* When dwc3 revisions >= 2.40a, LPM Erratum is enabled and
* DCFG.LPMCap is set, core responses with an ACK and the
- * BESL value in the LPM token is less than or equal to lPM
+ * BESL value in the LPM token is less than or equal to LPM
* NYET threshold.
*/
WARN_ONCE(dwc->revision < DWC3_REVISION_240A
Since the discussion of below thread, current enablement works for host-mode, device-mode hibernation is not implemented yet. http://marc.info/?l=linux-usb&m=141452396814414&w=2 Signed-off-by: Huang Rui <ray.huang@amd.com> --- drivers/usb/dwc3/core.c | 7 ++++++- drivers/usb/dwc3/gadget.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-)