Commit 4c1cb275 authored by Paul Walmsley's avatar Paul Walmsley Committed by Tony Lindgren

clk_disable_unused() is bugged

OMAP2/3 clock: fix CONFIG_OMAP_RESET_CLOCKS

plat-omap/clock.c was skipping clocks with enable_reg == 0.  This no longer
works now that we use enable_reg as an offset from a PRCM module.

Problem found and traced by Tero Kristo <tero.kristo@nokia.com> -
thanks Tero.
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent ec142b94
...@@ -384,8 +384,11 @@ static int __init clk_disable_unused(void) ...@@ -384,8 +384,11 @@ static int __init clk_disable_unused(void)
unsigned long flags; unsigned long flags;
list_for_each_entry(ck, &clocks, node) { list_for_each_entry(ck, &clocks, node) {
if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) || if (ck->usecount > 0 ||
ck->enable_reg == 0) (ck->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK)))
continue;
if (cpu_class_is_omap1() && ck->enable_reg == 0)
continue; continue;
spin_lock_irqsave(&clockfw_lock, flags); spin_lock_irqsave(&clockfw_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment