[PATCH v5 8/8] usb: dwc3: point host-mode hibernation enablement not device-mode
From: Huang Rui
Date: Thu Oct 30 2014 - 23:13:46 EST
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@xxxxxxx>
---
drivers/usb/dwc3/core.c | 7 ++++++-
drivers/usb/dwc3/gadget.c | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 8753792..a785fdd 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -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:
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 01e22d7..398c12f 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -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
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/