]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: mxs: convert platform code to clk_prepare/clk_unprepare
authorShawn Guo <shawn.guo@linaro.org>
Tue, 20 Dec 2011 05:50:11 +0000 (13:50 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Wed, 28 Dec 2011 13:26:07 +0000 (21:26 +0800)
The patch converts mxs platform code to clk_prepare/clk_unprepare
by using helper functions clk_prepare_enable/clk_disable_unprepare.

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-mxs/clock-mx23.c
arch/arm/mach-mxs/clock-mx28.c
arch/arm/mach-mxs/clock.c
arch/arm/mach-mxs/mach-mx28evk.c
arch/arm/mach-mxs/system.c
arch/arm/mach-mxs/timer.c

index 0163b6d83773fcf3d4e25ff9deaa8b16b6d662d3..e12e11231dc7d8ace7fcdee3b2288a1b8efb7796 100644 (file)
@@ -545,11 +545,11 @@ int __init mx23_clocks_init(void)
         */
        clk_set_parent(&ssp_clk, &ref_io_clk);
 
-       clk_enable(&cpu_clk);
-       clk_enable(&hbus_clk);
-       clk_enable(&xbus_clk);
-       clk_enable(&emi_clk);
-       clk_enable(&uart_clk);
+       clk_prepare_enable(&cpu_clk);
+       clk_prepare_enable(&hbus_clk);
+       clk_prepare_enable(&xbus_clk);
+       clk_prepare_enable(&emi_clk);
+       clk_prepare_enable(&uart_clk);
 
        clkdev_add_table(lookups, ARRAY_SIZE(lookups));
 
index da6e4aad177c2097b12515b2ddd2572e8b397ea2..f85f1f5b3e1f0f5feed9523b4d40d63ad193e863 100644 (file)
@@ -775,11 +775,11 @@ int __init mx28_clocks_init(void)
        clk_set_parent(&ssp0_clk, &ref_io0_clk);
        clk_set_parent(&ssp1_clk, &ref_io0_clk);
 
-       clk_enable(&cpu_clk);
-       clk_enable(&hbus_clk);
-       clk_enable(&xbus_clk);
-       clk_enable(&emi_clk);
-       clk_enable(&uart_clk);
+       clk_prepare_enable(&cpu_clk);
+       clk_prepare_enable(&hbus_clk);
+       clk_prepare_enable(&xbus_clk);
+       clk_prepare_enable(&emi_clk);
+       clk_prepare_enable(&uart_clk);
 
        clk_set_parent(&lcdif_clk, &ref_pix_clk);
        clk_set_parent(&saif0_clk, &pll0_clk);
index a7093c88e6a67d3145f581d2937074ad104a35c8..755eec0b5a8959d8bb9327e2eaaef7cbf76a6020 100644 (file)
@@ -166,7 +166,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
                return ret;
 
        if (clk->usecount)
-               clk_enable(parent);
+               clk_prepare_enable(parent);
 
        mutex_lock(&clocks_mutex);
        ret = clk->set_parent(clk, parent);
index 064ec5abaa557f7c6679bf4fe965c67f3fb6a022..6b9e83e6e893018838f610973b253c18bd100a53 100644 (file)
@@ -228,7 +228,7 @@ static void __init mx28evk_fec_reset(void)
        /* Enable fec phy clock */
        clk = clk_get_sys("pll2", NULL);
        if (!IS_ERR(clk))
-               clk_enable(clk);
+               clk_prepare_enable(clk);
 
        /* Power up fec phy */
        ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power");
index 20ec3bddf7cde3581503c3182b74a0e83bf25257..9760a1285e0d987622105e81d74d47425ab82ae2 100644 (file)
@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
 
        clk = clk_get_sys("rtc", NULL);
        if (!IS_ERR(clk))
-               clk_enable(clk);
+               clk_prepare_enable(clk);
 
        return 0;
 }
index cace0d2e5a55f03b42837093ea54220893f53f59..564a63279f184544455f091c85a7c9543099a805 100644 (file)
@@ -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)
 {
-       clk_enable(timer_clk);
+       clk_prepare_enable(timer_clk);
 
        /*
         * Initialize timers to a known state