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: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
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);