From patchwork Wed Mar 24 11:02:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 87869 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2OB1lro007845 for ; Wed, 24 Mar 2010 11:02:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755491Ab0CXLCw (ORCPT ); Wed, 24 Mar 2010 07:02:52 -0400 Received: from smtp.nokia.com ([192.100.122.230]:21172 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755426Ab0CXLCv (ORCPT ); Wed, 24 Mar 2010 07:02:51 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2OB2UDD013292; Wed, 24 Mar 2010 13:02:47 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Mar 2010 13:02:44 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Mar 2010 13:02:43 +0200 Received: from localhost.localdomain (esdhcp04078.research.nokia.com [172.21.40.78]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2OB2bYZ020246; Wed, 24 Mar 2010 13:02:38 +0200 From: Eduardo Valentin To: ext Nishanth Menon , ext Kevin Hilman Cc: Linux-OMAP , Eduardo Valentin Subject: [PM-WIP-OPP] [PATCH 1/1] OMAP3: PM: cpu-omap: Check governor limits before applying mpu frequency Date: Wed, 24 Mar 2010 13:02:31 +0200 Message-Id: <1269428551-779-1-git-send-email-eduardo.valentin@nokia.com> X-Mailer: git-send-email 1.7.0.2 X-OriginalArrivalTime: 24 Mar 2010 11:02:43.0521 (UTC) FILETIME=[87354B10:01CACB41] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Mar 2010 11:02:53 +0000 (UTC) diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index a69b557..0674405 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c @@ -88,7 +88,7 @@ static int omap_target(struct cpufreq_policy *policy, struct cpufreq_freqs freqs; #endif #if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) - unsigned long freq = target_freq * 1000; + unsigned long freq; #endif int ret = 0; @@ -114,6 +114,7 @@ static int omap_target(struct cpufreq_policy *policy, ret = clk_set_rate(mpu_clk, freqs.new * 1000); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); #elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) + freq = target_freq * 1000; if (opp_find_freq_ceil(OPP_MPU, &freq)) omap_pm_cpu_set_freq(freq); #endif