diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-20 00:50:11 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2011-12-28 08:26:07 -0500 |
commit | ae68f7af05dbce25889ab10b302fba927dcdb295 (patch) | |
tree | ad32e84db139482901f754c16a210540a9548af3 /arch/arm/mach-mxs | |
parent | 42c5d52f2bbf68add2d7a6982753993e0c75a119 (diff) |
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: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/clock-mx23.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-mxs/clock-mx28.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-mxs/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-mx28evk.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mxs/system.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mxs/timer.c | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c index 0163b6d83773..e12e11231dc7 100644 --- a/arch/arm/mach-mxs/clock-mx23.c +++ b/arch/arm/mach-mxs/clock-mx23.c | |||
@@ -545,11 +545,11 @@ int __init mx23_clocks_init(void) | |||
545 | */ | 545 | */ |
546 | clk_set_parent(&ssp_clk, &ref_io_clk); | 546 | clk_set_parent(&ssp_clk, &ref_io_clk); |
547 | 547 | ||
548 | clk_enable(&cpu_clk); | 548 | clk_prepare_enable(&cpu_clk); |
549 | clk_enable(&hbus_clk); | 549 | clk_prepare_enable(&hbus_clk); |
550 | clk_enable(&xbus_clk); | 550 | clk_prepare_enable(&xbus_clk); |
551 | clk_enable(&emi_clk); | 551 | clk_prepare_enable(&emi_clk); |
552 | clk_enable(&uart_clk); | 552 | clk_prepare_enable(&uart_clk); |
553 | 553 | ||
554 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 554 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
555 | 555 | ||
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index da6e4aad177c..f85f1f5b3e1f 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -775,11 +775,11 @@ int __init mx28_clocks_init(void) | |||
775 | clk_set_parent(&ssp0_clk, &ref_io0_clk); | 775 | clk_set_parent(&ssp0_clk, &ref_io0_clk); |
776 | clk_set_parent(&ssp1_clk, &ref_io0_clk); | 776 | clk_set_parent(&ssp1_clk, &ref_io0_clk); |
777 | 777 | ||
778 | clk_enable(&cpu_clk); | 778 | clk_prepare_enable(&cpu_clk); |
779 | clk_enable(&hbus_clk); | 779 | clk_prepare_enable(&hbus_clk); |
780 | clk_enable(&xbus_clk); | 780 | clk_prepare_enable(&xbus_clk); |
781 | clk_enable(&emi_clk); | 781 | clk_prepare_enable(&emi_clk); |
782 | clk_enable(&uart_clk); | 782 | clk_prepare_enable(&uart_clk); |
783 | 783 | ||
784 | clk_set_parent(&lcdif_clk, &ref_pix_clk); | 784 | clk_set_parent(&lcdif_clk, &ref_pix_clk); |
785 | clk_set_parent(&saif0_clk, &pll0_clk); | 785 | clk_set_parent(&saif0_clk, &pll0_clk); |
diff --git a/arch/arm/mach-mxs/clock.c b/arch/arm/mach-mxs/clock.c index a7093c88e6a6..755eec0b5a89 100644 --- a/arch/arm/mach-mxs/clock.c +++ b/arch/arm/mach-mxs/clock.c | |||
@@ -166,7 +166,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
166 | return ret; | 166 | return ret; |
167 | 167 | ||
168 | if (clk->usecount) | 168 | if (clk->usecount) |
169 | clk_enable(parent); | 169 | clk_prepare_enable(parent); |
170 | 170 | ||
171 | mutex_lock(&clocks_mutex); | 171 | mutex_lock(&clocks_mutex); |
172 | ret = clk->set_parent(clk, parent); | 172 | ret = clk->set_parent(clk, parent); |
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index 064ec5abaa55..6b9e83e6e893 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c | |||
@@ -228,7 +228,7 @@ static void __init mx28evk_fec_reset(void) | |||
228 | /* Enable fec phy clock */ | 228 | /* Enable fec phy clock */ |
229 | clk = clk_get_sys("pll2", NULL); | 229 | clk = clk_get_sys("pll2", NULL); |
230 | if (!IS_ERR(clk)) | 230 | if (!IS_ERR(clk)) |
231 | clk_enable(clk); | 231 | clk_prepare_enable(clk); |
232 | 232 | ||
233 | /* Power up fec phy */ | 233 | /* Power up fec phy */ |
234 | ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power"); | 234 | ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power"); |
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c index 20ec3bddf7cd..9760a1285e0d 100644 --- a/arch/arm/mach-mxs/system.c +++ b/arch/arm/mach-mxs/system.c | |||
@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void) | |||
66 | 66 | ||
67 | clk = clk_get_sys("rtc", NULL); | 67 | clk = clk_get_sys("rtc", NULL); |
68 | if (!IS_ERR(clk)) | 68 | if (!IS_ERR(clk)) |
69 | clk_enable(clk); | 69 | clk_prepare_enable(clk); |
70 | 70 | ||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c index cace0d2e5a55..564a63279f18 100644 --- a/arch/arm/mach-mxs/timer.c +++ b/arch/arm/mach-mxs/timer.c | |||
@@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk) | |||
245 | 245 | ||
246 | void __init mxs_timer_init(struct clk *timer_clk, int irq) | 246 | void __init mxs_timer_init(struct clk *timer_clk, int irq) |
247 | { | 247 | { |
248 | clk_enable(timer_clk); | 248 | clk_prepare_enable(timer_clk); |
249 | 249 | ||
250 | /* | 250 | /* |
251 | * Initialize timers to a known state | 251 | * Initialize timers to a known state |