aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2014-10-28 07:54:22 -0400
committerFelipe Balbi <balbi@ti.com>2014-11-03 11:03:35 -0500
commit2eac3992897e3e1be40e518032dbfd6aeca1932b (patch)
tree0f8e919082374d2f07c38c025e53e8d46b71d7d4 /drivers/usb/dwc3/core.c
parent1e5e2d3d055436c114e2f16145b83339aed024ff (diff)
usb: dwc3: enable hibernation if to be supported
It enables hibernation if the function is set in coreConsultant. Suggested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index fa396fc57a85..2f7aecc620e7 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -449,6 +449,12 @@ static int dwc3_core_init(struct dwc3 *dwc)
449 case DWC3_GHWPARAMS1_EN_PWROPT_HIB: 449 case DWC3_GHWPARAMS1_EN_PWROPT_HIB:
450 /* enable hibernation here */ 450 /* enable hibernation here */
451 dwc->nr_scratch = DWC3_GHWPARAMS4_HIBER_SCRATCHBUFS(hwparams4); 451 dwc->nr_scratch = DWC3_GHWPARAMS4_HIBER_SCRATCHBUFS(hwparams4);
452
453 /*
454 * REVISIT Enabling this bit so that host-mode hibernation
455 * will work. Device-mode hibernation is not yet implemented.
456 */
457 reg |= DWC3_GCTL_GBLHIBERNATIONEN;
452 break; 458 break;
453 default: 459 default:
454 dev_dbg(dwc->dev, "No power optimization available\n"); 460 dev_dbg(dwc->dev, "No power optimization available\n");