From patchwork Fri May 22 12:48:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 25424 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 n4MCnvlO010380 for ; Fri, 22 May 2009 12:49:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386AbZEVMtx (ORCPT ); Fri, 22 May 2009 08:49:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752640AbZEVMtx (ORCPT ); Fri, 22 May 2009 08:49:53 -0400 Received: from smtp.nokia.com ([192.100.105.134]:33727 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752386AbZEVMtx (ORCPT ); Fri, 22 May 2009 08:49:53 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n4MCnmCe004239; Fri, 22 May 2009 07:49:51 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 22 May 2009 15:49:25 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 22 May 2009 15:49:25 +0300 Received: from localhost.localdomain (esdhcp039131.research.nokia.com [172.21.39.131]) by mgw-sa01.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n4MCnOXb003951; Fri, 22 May 2009 15:49:24 +0300 From: Roger Quadros To: khilman@deeprootsystems.com Cc: rnayak@ti.com, linux-omap@vger.kernel.org Subject: [PATCH] OMAP3: PM: Fix VDD2 OPP determining logic Date: Fri, 22 May 2009 15:48:49 +0300 Message-Id: <1242996529-8655-1-git-send-email-ext-roger.quadros@nokia.com> X-Mailer: git-send-email 1.6.0.4 X-OriginalArrivalTime: 22 May 2009 12:49:25.0393 (UTC) FILETIME=[BC9DF010:01C9DADB] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The VDD2 OPP table is as per L3 clock rates and not on DPLL2 rate. So, we use the correct clock rate to calculate the current OPP for VDD2. Signed-off-by: Roger Quadros --- arch/arm/mach-omap2/resource34xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index 9908e52..d55cc51 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -172,6 +172,7 @@ static unsigned short get_opp(struct omap_opp *opp_freq_table, */ void init_opp(struct shared_resource *resp) { + struct clk *l3_clk; resp->no_of_users = 0; if (!mpu_opps || !dsp_opps || !l3_opps) @@ -190,8 +191,9 @@ void init_opp(struct shared_resource *resp) } else if (strcmp(resp->name, "vdd2_opp") == 0) { vdd2_resp = resp; dpll3_clk = clk_get(NULL, "dpll3_m2_ck"); + l3_clk = clk_get(NULL, "l3_ick"); resp->curr_level = get_opp(l3_opps + MAX_VDD2_OPP, - dpll2_clk->rate); + l3_clk->rate); curr_vdd2_opp = resp->curr_level; } return;