[PATCH] OMAP2/3 clock: fix CONFIG_OMAP_RESET_CLOCKS
From: Paul Walmsley
Date: Thu Feb 05 2009 - 03:18:27 EST
Hello Russell,
Kevin Hilman kindly alerted me to a bugfix patch that I had omitted from
the sets that I sent to you recently. It's inserted below. Perhaps you
might consider merging it along with the other sets that you are working
on? Without it, chip power management won't work correctly.
The good news is that it is a small and self-contained patch that should
be possible to apply at any point after patch D 08.
thanks,
- Paul
From: Paul Walmsley <paul@xxxxxxxxx>
Date: Thu, 5 Feb 2009 00:58:23 -0700
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@xxxxxxxxx> -
thanks Tero.
linux-omap source commit is 4c1cb27545d19642d43874ebeacef83bf3566b86.
Signed-off-by: Paul Walmsley <paul@xxxxxxxxx>
Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
Cc: Tero Kristo <tero.kristo@xxxxxxxxx>
---
arch/arm/plat-omap/clock.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index c1fad02..bdf2cd4 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -547,8 +547,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);
--
1.6.0.2.GIT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/