aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorVivek Gautam <gautam.vivek@samsung.com>2014-11-21 08:35:46 -0500
committerFelipe Balbi <balbi@ti.com>2014-11-21 10:06:43 -0500
commit72d996fc7a01c2e4d581a15db7d001e2799ffb29 (patch)
treebefa43b8232d147fba1703864ce2842ad729695e /drivers/usb
parentc1a3acaadde7eb260f4fd4ec87cb87d3ffeed979 (diff)
usb: dwc3: exynos: Add provision for suspend clock
DWC3 controller on Exynos SoC series have separate control for suspend clock which replaces pipe3_rx_pclk as clock source to a small part of DWC3 core that operates when SS PHY is in its lowest power state (P3) in states SS.disabled and U3. Suggested-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/dwc3-exynos.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index 14f85a08a4cf..a1782d86a226 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -34,6 +34,8 @@ struct dwc3_exynos {
34 struct device *dev; 34 struct device *dev;
35 35
36 struct clk *clk; 36 struct clk *clk;
37 struct clk *susp_clk;
38
37 struct regulator *vdd33; 39 struct regulator *vdd33;
38 struct regulator *vdd10; 40 struct regulator *vdd10;
39}; 41};
@@ -140,6 +142,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
140 } 142 }
141 clk_prepare_enable(exynos->clk); 143 clk_prepare_enable(exynos->clk);
142 144
145 exynos->susp_clk = devm_clk_get(dev, "usbdrd30_susp_clk");
146 if (IS_ERR(exynos->susp_clk)) {
147 dev_dbg(dev, "no suspend clk specified\n");
148 exynos->susp_clk = NULL;
149 }
150 clk_prepare_enable(exynos->susp_clk);
151
143 exynos->vdd33 = devm_regulator_get(dev, "vdd33"); 152 exynos->vdd33 = devm_regulator_get(dev, "vdd33");
144 if (IS_ERR(exynos->vdd33)) { 153 if (IS_ERR(exynos->vdd33)) {
145 ret = PTR_ERR(exynos->vdd33); 154 ret = PTR_ERR(exynos->vdd33);
@@ -181,6 +190,7 @@ err4:
181err3: 190err3:
182 regulator_disable(exynos->vdd33); 191 regulator_disable(exynos->vdd33);
183err2: 192err2:
193 clk_disable_unprepare(exynos->susp_clk);
184 clk_disable_unprepare(exynos->clk); 194 clk_disable_unprepare(exynos->clk);
185 return ret; 195 return ret;
186} 196}
@@ -193,6 +203,7 @@ static int dwc3_exynos_remove(struct platform_device *pdev)
193 platform_device_unregister(exynos->usb2_phy); 203 platform_device_unregister(exynos->usb2_phy);
194 platform_device_unregister(exynos->usb3_phy); 204 platform_device_unregister(exynos->usb3_phy);
195 205
206 clk_disable_unprepare(exynos->susp_clk);
196 clk_disable_unprepare(exynos->clk); 207 clk_disable_unprepare(exynos->clk);
197 208
198 regulator_disable(exynos->vdd33); 209 regulator_disable(exynos->vdd33);