diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:40:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:40:55 -0400 |
commit | 85b375a613085b78531ec86369a51c2f3b922f95 (patch) | |
tree | 716437d598de92bbd7acaf24622e9a7d74fc209a /arch/arm/plat-omap/clock.c | |
parent | ec965350bb98bd291eb34f6ecddfdcfc36da1e6e (diff) | |
parent | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (212 commits)
[ARM] pxa: Phycore pcm-990-specific code for the PXA270 Quick Capture driver
[ARM] pxa: V4L2 soc_camera driver for PXA270
[ARM] pxa: restrict availability of pxa2xx PCMCIA drivers
[ARM] 5005/1: BAST: Fix kset_name initialiser
[ARM] 4967/1: Adds functions to set clkout rate for Samsung S3C2410
[ARM] 4988/1: Add GPIO lib support to the EP93xx
[ARM] Add initial sparsemem support
[ARM] pxa: initialise PXA devices before platform init code
[ARM] 5002/1: tosa: add two more leds
[ARM] 5004/1: Tosa: make several unreferenced structures static.
[ARM] 5003/1: Shut up sparse warnings
[ARM] 4977/2: soc - pxa2xx-ac97 - Add missing clk_enable()
[ARM] 4976/1: zylonite: Configure GPIO for WM9713 IRQ line
[ARM] 4974/1: Drop unused leds-tosa.
[ARM] 4973/1: Tosa: use leds-gpio driver.
[ARM] 4972/1: Tosa: convert scoop GPIOs usage to generic gpio code
[ARM] 4971/1: pxaficp_ir: provide startup and shutdown hooks
[ARM] pxa: lubbock: move mis-placed SPI info
[ARM] 4970/1: tosa: correct gpio used for wake up.
[ARM] 4966/1: magician: add MFP pin configuration
...
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 | |||