aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-09-25 06:27:20 -0400
committerTony Lindgren <tony@atomide.com>2006-09-25 06:27:20 -0400
commit90afd5cb2ac0977c38e83b6b21493da911b242b3 (patch)
tree7d0dedf7bfedb76e9bb2149f7f8aec1aaed159f9 /arch/arm/plat-omap
parent1630b52ddf4fc27e0dc421a57e4788bf9d3886cc (diff)
ARM: OMAP: Sync clocks with linux-omap tree
Mostly clean up CONFIG_OMAP_RESET_CLOCKS. Also includes a patch from Imre Deak to make McSPI clocks use id. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/clock.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 4abf2714f2d9..f1179ad4be1b 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -323,6 +323,31 @@ EXPORT_SYMBOL(clk_allow_idle);
323 323
324/*-------------------------------------------------------------------------*/ 324/*-------------------------------------------------------------------------*/
325 325
326#ifdef CONFIG_OMAP_RESET_CLOCKS
327/*
328 * Disable any unused clocks left on by the bootloader
329 */
330static int __init clk_disable_unused(void)
331{
332 struct clk *ck;
333 unsigned long flags;
334
335 list_for_each_entry(ck, &clocks, node) {
336 if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) ||
337 ck->enable_reg == 0)
338 continue;
339
340 spin_lock_irqsave(&clockfw_lock, flags);
341 if (arch_clock->clk_disable_unused)
342 arch_clock->clk_disable_unused(ck);
343 spin_unlock_irqrestore(&clockfw_lock, flags);
344 }
345
346 return 0;
347}
348late_initcall(clk_disable_unused);
349#endif
350
326int __init clk_init(struct clk_functions * custom_clocks) 351int __init clk_init(struct clk_functions * custom_clocks)
327{ 352{
328 if (!custom_clocks) { 353 if (!custom_clocks) {