diff options
author | Tony Lindgren <tony@atomide.com> | 2006-09-25 13:27:20 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2006-09-25 13:27:20 +0300 |
commit | 90afd5cb2ac0977c38e83b6b21493da911b242b3 (patch) | |
tree | 7d0dedf7bfedb76e9bb2149f7f8aec1aaed159f9 /arch/arm/plat-omap | |
parent | 1630b52ddf4fc27e0dc421a57e4788bf9d3886cc (diff) | |
download | kernel_samsung_espresso10-90afd5cb2ac0977c38e83b6b21493da911b242b3.zip kernel_samsung_espresso10-90afd5cb2ac0977c38e83b6b21493da911b242b3.tar.gz kernel_samsung_espresso10-90afd5cb2ac0977c38e83b6b21493da911b242b3.tar.bz2 |
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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 4abf271..f1179ad 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -323,6 +323,31 @@ EXPORT_SYMBOL(clk_allow_idle); /*-------------------------------------------------------------------------*/ +#ifdef CONFIG_OMAP_RESET_CLOCKS +/* + * Disable any unused clocks left on by the bootloader + */ +static int __init clk_disable_unused(void) +{ + struct clk *ck; + unsigned long flags; + + list_for_each_entry(ck, &clocks, node) { + if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) || + ck->enable_reg == 0) + continue; + + spin_lock_irqsave(&clockfw_lock, flags); + if (arch_clock->clk_disable_unused) + arch_clock->clk_disable_unused(ck); + spin_unlock_irqrestore(&clockfw_lock, flags); + } + + return 0; +} +late_initcall(clk_disable_unused); +#endif + int __init clk_init(struct clk_functions * custom_clocks) { if (!custom_clocks) { |