Commit ae68f7af authored by Shawn Guo's avatar Shawn Guo

ARM: mxs: convert platform code to clk_prepare/clk_unprepare

The patch converts mxs platform code to clk_prepare/clk_unprepare
by using helper functions clk_prepare_enable/clk_disable_unprepare.
Signed-off-by: default avatarRichard Zhao <richard.zhao@linaro.org>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
parent 42c5d52f
...@@ -545,11 +545,11 @@ int __init mx23_clocks_init(void) ...@@ -545,11 +545,11 @@ int __init mx23_clocks_init(void)
*/ */
clk_set_parent(&ssp_clk, &ref_io_clk); clk_set_parent(&ssp_clk, &ref_io_clk);
clk_enable(&cpu_clk); clk_prepare_enable(&cpu_clk);
clk_enable(&hbus_clk); clk_prepare_enable(&hbus_clk);
clk_enable(&xbus_clk); clk_prepare_enable(&xbus_clk);
clk_enable(&emi_clk); clk_prepare_enable(&emi_clk);
clk_enable(&uart_clk); clk_prepare_enable(&uart_clk);
clkdev_add_table(lookups, ARRAY_SIZE(lookups)); clkdev_add_table(lookups, ARRAY_SIZE(lookups));
......
...@@ -775,11 +775,11 @@ int __init mx28_clocks_init(void) ...@@ -775,11 +775,11 @@ int __init mx28_clocks_init(void)
clk_set_parent(&ssp0_clk, &ref_io0_clk); clk_set_parent(&ssp0_clk, &ref_io0_clk);
clk_set_parent(&ssp1_clk, &ref_io0_clk); clk_set_parent(&ssp1_clk, &ref_io0_clk);
clk_enable(&cpu_clk); clk_prepare_enable(&cpu_clk);
clk_enable(&hbus_clk); clk_prepare_enable(&hbus_clk);
clk_enable(&xbus_clk); clk_prepare_enable(&xbus_clk);
clk_enable(&emi_clk); clk_prepare_enable(&emi_clk);
clk_enable(&uart_clk); clk_prepare_enable(&uart_clk);
clk_set_parent(&lcdif_clk, &ref_pix_clk); clk_set_parent(&lcdif_clk, &ref_pix_clk);
clk_set_parent(&saif0_clk, &pll0_clk); clk_set_parent(&saif0_clk, &pll0_clk);
......
...@@ -166,7 +166,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) ...@@ -166,7 +166,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
return ret; return ret;
if (clk->usecount) if (clk->usecount)
clk_enable(parent); clk_prepare_enable(parent);
mutex_lock(&clocks_mutex); mutex_lock(&clocks_mutex);
ret = clk->set_parent(clk, parent); ret = clk->set_parent(clk, parent);
......
...@@ -228,7 +228,7 @@ static void __init mx28evk_fec_reset(void) ...@@ -228,7 +228,7 @@ static void __init mx28evk_fec_reset(void)
/* Enable fec phy clock */ /* Enable fec phy clock */
clk = clk_get_sys("pll2", NULL); clk = clk_get_sys("pll2", NULL);
if (!IS_ERR(clk)) if (!IS_ERR(clk))
clk_enable(clk); clk_prepare_enable(clk);
/* Power up fec phy */ /* Power up fec phy */
ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power"); ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power");
......
...@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void) ...@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
clk = clk_get_sys("rtc", NULL); clk = clk_get_sys("rtc", NULL);
if (!IS_ERR(clk)) if (!IS_ERR(clk))
clk_enable(clk); clk_prepare_enable(clk);
return 0; return 0;
} }
......
...@@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk) ...@@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
void __init mxs_timer_init(struct clk *timer_clk, int irq) void __init mxs_timer_init(struct clk *timer_clk, int irq)
{ {
clk_enable(timer_clk); clk_prepare_enable(timer_clk);
/* /*
* Initialize timers to a known state * Initialize timers to a known state
......
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