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>
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user