Commit 2eac3992 authored by Huang Rui's avatar Huang Rui Committed by Felipe Balbi

usb: dwc3: enable hibernation if to be supported

It enables hibernation if the function is set in coreConsultant.
Suggested-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 1e5e2d3d
...@@ -449,6 +449,12 @@ static int dwc3_core_init(struct dwc3 *dwc) ...@@ -449,6 +449,12 @@ static int dwc3_core_init(struct dwc3 *dwc)
case DWC3_GHWPARAMS1_EN_PWROPT_HIB: case DWC3_GHWPARAMS1_EN_PWROPT_HIB:
/* enable hibernation here */ /* enable hibernation here */
dwc->nr_scratch = DWC3_GHWPARAMS4_HIBER_SCRATCHBUFS(hwparams4); dwc->nr_scratch = DWC3_GHWPARAMS4_HIBER_SCRATCHBUFS(hwparams4);
/*
* REVISIT Enabling this bit so that host-mode hibernation
* will work. Device-mode hibernation is not yet implemented.
*/
reg |= DWC3_GCTL_GBLHIBERNATIONEN;
break; break;
default: default:
dev_dbg(dwc->dev, "No power optimization available\n"); dev_dbg(dwc->dev, "No power optimization available\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment