diff options
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 5261a0923691..7190cbd92620 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -12,14 +12,12 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/module.h> | ||
16 | #include <linux/list.h> | 15 | #include <linux/list.h> |
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 17 | #include <linux/err.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
20 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
21 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
24 | #include <linux/debugfs.h> | 22 | #include <linux/debugfs.h> |
25 | #include <linux/io.h> | 23 | #include <linux/io.h> |
@@ -32,9 +30,9 @@ static DEFINE_SPINLOCK(clockfw_lock); | |||
32 | 30 | ||
33 | static struct clk_functions *arch_clock; | 31 | static struct clk_functions *arch_clock; |
34 | 32 | ||
35 | /*------------------------------------------------------------------------- | 33 | /* |
36 | * Standard clock functions defined in include/linux/clk.h | 34 | * Standard clock functions defined in include/linux/clk.h |
37 | *-------------------------------------------------------------------------*/ | 35 | */ |
38 | 36 | ||
39 | int clk_enable(struct clk *clk) | 37 | int clk_enable(struct clk *clk) |
40 | { | 38 | { |
@@ -92,9 +90,9 @@ unsigned long clk_get_rate(struct clk *clk) | |||
92 | } | 90 | } |
93 | EXPORT_SYMBOL(clk_get_rate); | 91 | EXPORT_SYMBOL(clk_get_rate); |
94 | 92 | ||
95 | /*------------------------------------------------------------------------- | 93 | /* |
96 | * Optional clock functions defined in include/linux/clk.h | 94 | * Optional clock functions defined in include/linux/clk.h |
97 | *-------------------------------------------------------------------------*/ | 95 | */ |
98 | 96 | ||
99 | long clk_round_rate(struct clk *clk, unsigned long rate) | 97 | long clk_round_rate(struct clk *clk, unsigned long rate) |
100 | { | 98 | { |
@@ -140,9 +138,6 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
140 | unsigned long flags; | 138 | unsigned long flags; |
141 | int ret = -EINVAL; | 139 | int ret = -EINVAL; |
142 | 140 | ||
143 | if (cpu_is_omap44xx()) | ||
144 | /* OMAP4 clk framework not supported yet */ | ||
145 | return 0; | ||
146 | if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) | 141 | if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) |
147 | return ret; | 142 | return ret; |
148 | 143 | ||
@@ -169,9 +164,9 @@ struct clk *clk_get_parent(struct clk *clk) | |||
169 | } | 164 | } |
170 | EXPORT_SYMBOL(clk_get_parent); | 165 | EXPORT_SYMBOL(clk_get_parent); |
171 | 166 | ||
172 | /*------------------------------------------------------------------------- | 167 | /* |
173 | * OMAP specific clock functions shared between omap1 and omap2 | 168 | * OMAP specific clock functions shared between omap1 and omap2 |
174 | *-------------------------------------------------------------------------*/ | 169 | */ |
175 | 170 | ||
176 | int __initdata mpurate; | 171 | int __initdata mpurate; |
177 | 172 | ||
@@ -222,7 +217,7 @@ void clk_reparent(struct clk *child, struct clk *parent) | |||
222 | } | 217 | } |
223 | 218 | ||
224 | /* Propagate rate to children */ | 219 | /* Propagate rate to children */ |
225 | void propagate_rate(struct clk * tclk) | 220 | void propagate_rate(struct clk *tclk) |
226 | { | 221 | { |
227 | struct clk *clkp; | 222 | struct clk *clkp; |
228 | 223 | ||
@@ -389,7 +384,9 @@ void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) | |||
389 | } | 384 | } |
390 | #endif | 385 | #endif |
391 | 386 | ||
392 | /*-------------------------------------------------------------------------*/ | 387 | /* |
388 | * | ||
389 | */ | ||
393 | 390 | ||
394 | #ifdef CONFIG_OMAP_RESET_CLOCKS | 391 | #ifdef CONFIG_OMAP_RESET_CLOCKS |
395 | /* | 392 | /* |
@@ -404,7 +401,7 @@ static int __init clk_disable_unused(void) | |||
404 | if (ck->ops == &clkops_null) | 401 | if (ck->ops == &clkops_null) |
405 | continue; | 402 | continue; |
406 | 403 | ||
407 | if (ck->usecount > 0 || ck->enable_reg == 0) | 404 | if (ck->usecount > 0 || !ck->enable_reg) |
408 | continue; | 405 | continue; |
409 | 406 | ||
410 | spin_lock_irqsave(&clockfw_lock, flags); | 407 | spin_lock_irqsave(&clockfw_lock, flags); |