diff options
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 0a603242f367..32a533ba9ada 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -304,6 +304,23 @@ void propagate_rate(struct clk * tclk) | |||
304 | } | 304 | } |
305 | } | 305 | } |
306 | 306 | ||
307 | /** | ||
308 | * recalculate_root_clocks - recalculate and propagate all root clocks | ||
309 | * | ||
310 | * Recalculates all root clocks (clocks with no parent), which if the | ||
311 | * clock's .recalc is set correctly, should also propagate their rates. | ||
312 | * Called at init. | ||
313 | */ | ||
314 | void recalculate_root_clocks(void) | ||
315 | { | ||
316 | struct clk *clkp; | ||
317 | |||
318 | list_for_each_entry(clkp, &clocks, node) { | ||
319 | if (unlikely(!clkp->parent) && likely((u32)clkp->recalc)) | ||
320 | clkp->recalc(clkp); | ||
321 | } | ||
322 | } | ||
323 | |||
307 | int clk_register(struct clk *clk) | 324 | int clk_register(struct clk *clk) |
308 | { | 325 | { |
309 | if (clk == NULL || IS_ERR(clk)) | 326 | if (clk == NULL || IS_ERR(clk)) |
@@ -358,6 +375,30 @@ void clk_allow_idle(struct clk *clk) | |||
358 | } | 375 | } |
359 | EXPORT_SYMBOL(clk_allow_idle); | 376 | EXPORT_SYMBOL(clk_allow_idle); |
360 | 377 | ||
378 | void clk_enable_init_clocks(void) | ||
379 | { | ||
380 | struct clk *clkp; | ||
381 | |||
382 | list_for_each_entry(clkp, &clocks, node) { | ||
383 | if (clkp->flags & ENABLE_ON_INIT) | ||
384 | clk_enable(clkp); | ||
385 | } | ||
386 | } | ||
387 | EXPORT_SYMBOL(clk_enable_init_clocks); | ||
388 | |||
389 | #ifdef CONFIG_CPU_FREQ | ||
390 | void clk_init_cpufreq_table(struct cpufreq_frequency_table **table) | ||
391 | { | ||
392 | unsigned long flags; | ||
393 | |||
394 | spin_lock_irqsave(&clockfw_lock, flags); | ||
395 | if (arch_clock->clk_init_cpufreq_table) | ||
396 | arch_clock->clk_init_cpufreq_table(table); | ||
397 | spin_unlock_irqrestore(&clockfw_lock, flags); | ||
398 | } | ||
399 | EXPORT_SYMBOL(clk_init_cpufreq_table); | ||
400 | #endif | ||
401 | |||
361 | /*-------------------------------------------------------------------------*/ | 402 | /*-------------------------------------------------------------------------*/ |
362 | 403 | ||
363 | #ifdef CONFIG_OMAP_RESET_CLOCKS | 404 | #ifdef CONFIG_OMAP_RESET_CLOCKS |
@@ -396,3 +437,4 @@ int __init clk_init(struct clk_functions * custom_clocks) | |||
396 | 437 | ||
397 | return 0; | 438 | return 0; |
398 | } | 439 | } |
440 | |||