aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-07-24 09:30:55 -0400
committerMike Turquette <mturquette@linaro.org>2014-01-17 15:35:27 -0500
commit62125a46cd717ad8fa6a64d260d46a0a108e6222 (patch)
treed77f91368cf32c9b3c54c84e400284e546bb6b06 /drivers/clk
parent52b14728dd890f8a62bffce8dfece496434c2b41 (diff)
CLK: TI: omap5: Initialize USB_DPLL at boot
USB_DPLL must be initialized and locked at boot so that USB modules can work. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Nishanth Menon <nm@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/ti/clk-54xx.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/clk/ti/clk-54xx.c b/drivers/clk/ti/clk-54xx.c
index c876e6ee57b3..0ef9f581286b 100644
--- a/drivers/clk/ti/clk-54xx.c
+++ b/drivers/clk/ti/clk-54xx.c
@@ -19,6 +19,12 @@
19 19
20#define OMAP5_DPLL_ABE_DEFFREQ 98304000 20#define OMAP5_DPLL_ABE_DEFFREQ 98304000
21 21
22/*
23 * OMAP543x TRM, section "3.6.3.9.5 DPLL_USB Preferred Settings"
24 * states it must be at 960MHz
25 */
26#define OMAP5_DPLL_USB_DEFFREQ 960000000
27
22static struct ti_dt_clk omap54xx_clks[] = { 28static struct ti_dt_clk omap54xx_clks[] = {
23 DT_CLK(NULL, "pad_clks_src_ck", "pad_clks_src_ck"), 29 DT_CLK(NULL, "pad_clks_src_ck", "pad_clks_src_ck"),
24 DT_CLK(NULL, "pad_clks_ck", "pad_clks_ck"), 30 DT_CLK(NULL, "pad_clks_ck", "pad_clks_ck"),
@@ -220,7 +226,7 @@ static struct ti_dt_clk omap54xx_clks[] = {
220int __init omap5xxx_dt_clk_init(void) 226int __init omap5xxx_dt_clk_init(void)
221{ 227{
222 int rc; 228 int rc;
223 struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck; 229 struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck, *usb_dpll;
224 230
225 ti_dt_clocks_register(omap54xx_clks); 231 ti_dt_clocks_register(omap54xx_clks);
226 232
@@ -235,5 +241,15 @@ int __init omap5xxx_dt_clk_init(void)
235 if (rc) 241 if (rc)
236 pr_err("%s: failed to configure ABE DPLL!\n", __func__); 242 pr_err("%s: failed to configure ABE DPLL!\n", __func__);
237 243
244 usb_dpll = clk_get_sys(NULL, "dpll_usb_ck");
245 rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ);
246 if (rc)
247 pr_err("%s: failed to configure USB DPLL!\n", __func__);
248
249 usb_dpll = clk_get_sys(NULL, "dpll_usb_m2_ck");
250 rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ/2);
251 if (rc)
252 pr_err("%s: failed to set USB_DPLL M2 OUT\n", __func__);
253
238 return 0; 254 return 0;
239} 255}