[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1414663725-2195-2-git-send-email-ray.huang@amd.com>
Date: Thu, 30 Oct 2014 18:08:26 +0800
From: Huang Rui <ray.huang@....com>
To: Felipe Balbi <balbi@...com>,
Alan Stern <stern@...land.harvard.edu>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Paul Zimmerman <Paul.Zimmerman@...opsys.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Jason Chang <jason.chang@....com>,
Vincent Wan <vincent.wan@....com>, Tony Li <tony.li@....com>,
<linux-usb@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
Huang Rui <ray.huang@....com>
Subject: [PATCH v4 01/20] usb: dwc3: enable hibernation if to be supported
It enables hibernation if the function is set in coreConsultant.
Suggested-by: Felipe Balbi <balbi@...com>
Signed-off-by: Huang Rui <ray.huang@....com>
Signed-off-by: Felipe Balbi <balbi@...com>
---
drivers/usb/dwc3/core.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index fa396fc..5a47482 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -447,8 +447,14 @@ 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:
dev_dbg(dwc->dev, "No power optimization available\n");
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists