From patchwork Thu Feb 5 08:18:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 5606 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n158IDa0000822 for ; Thu, 5 Feb 2009 08:18:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756533AbZBEISM (ORCPT ); Thu, 5 Feb 2009 03:18:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756456AbZBEISM (ORCPT ); Thu, 5 Feb 2009 03:18:12 -0500 Received: from utopia.booyaka.com ([72.9.107.138]:53779 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756177AbZBEISL (ORCPT ); Thu, 5 Feb 2009 03:18:11 -0500 Received: (qmail 6398 invoked by uid 526); 5 Feb 2009 08:18:09 -0000 Date: Thu, 5 Feb 2009 01:18:09 -0700 (MST) From: Paul Walmsley To: linux@arm.linux.org.uk cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk, linux-kernel@vger.kernel.org, tero.kristo@nokia.com, khilman@deeprootsystems.com, tony@atomide.com Subject: [PATCH] OMAP2/3 clock: fix CONFIG_OMAP_RESET_CLOCKS Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 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 - thanks Tero. linux-omap source commit is 4c1cb27545d19642d43874ebeacef83bf3566b86. Signed-off-by: Paul Walmsley Signed-off-by: Tony Lindgren Cc: Tero Kristo --- 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);