From: Paul Walmsley Date: Wed, 24 Sep 2008 10:48:05 +0000 (-0600) Subject: clk_disable_unused() is bugged X-Git-Tag: v2.6.27-omap1~66 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4c1cb27545d19642d43874ebeacef83bf3566b86;p=linux-2.6-omap-h63xx.git 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 - thanks Tero. Signed-off-by: Paul Walmsley Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 197974defbe..7bbfba2a5c1 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -384,8 +384,11 @@ static int __init clk_disable_unused(void) unsigned long flags; list_for_each_entry(ck, &clocks, node) { - if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) || - ck->enable_reg == 0) + if (ck->usecount > 0 || + (ck->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))) + continue; + + if (cpu_class_is_omap1() && ck->enable_reg == 0) continue; spin_lock_irqsave(&clockfw_lock, flags);