Commit f8abc080 authored by Viresh Kumar's avatar Viresh Kumar Committed by Arnd Bergmann

SPEAr: Call clk_prepare() before calling clk_enable

With common clock framework, it is must to call clk_{un}prepare() before/after
clk_{dis}enable. This patch fixes this for SPEAr timer.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
Reviewed-by: default avatarMike Turquette <mturquette@linaro.org>
parent a45896bd
...@@ -219,10 +219,10 @@ void __init spear_setup_timer(void) ...@@ -219,10 +219,10 @@ void __init spear_setup_timer(void)
goto err_iomap; goto err_iomap;
} }
ret = clk_enable(gpt_clk); ret = clk_prepare_enable(gpt_clk);
if (ret < 0) { if (ret < 0) {
pr_err("%s:couldn't enable gpt clock\n", __func__); pr_err("%s:couldn't prepare-enable gpt clock\n", __func__);
goto err_clk; goto err_prepare_enable_clk;
} }
spear_clockevent_init(); spear_clockevent_init();
...@@ -230,7 +230,7 @@ void __init spear_setup_timer(void) ...@@ -230,7 +230,7 @@ void __init spear_setup_timer(void)
return; return;
err_clk: err_prepare_enable_clk:
clk_put(gpt_clk); clk_put(gpt_clk);
err_iomap: err_iomap:
iounmap(gpt_base); iounmap(gpt_base);
......
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