From patchwork Thu Feb 18 08:31:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 80217 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 o1I8VGBf009370 for ; Thu, 18 Feb 2010 08:31:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753322Ab0BRIbQ (ORCPT ); Thu, 18 Feb 2010 03:31:16 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:58925 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206Ab0BRIbP (ORCPT ); Thu, 18 Feb 2010 03:31:15 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1I8V9dc031003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 02:31:13 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o1I8V6jw008865; Thu, 18 Feb 2010 14:01:07 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id o1I8V6Up010952; Thu, 18 Feb 2010 14:01:06 +0530 Received: (from a0393109@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o1I8V6tt010949; Thu, 18 Feb 2010 14:01:06 +0530 From: Thara Gopinath To: linux-omap@vger.kernel.org Cc: Thara Gopinath , Kevin Hilman Subject: [PATCH] PM-WIP-OPP: Fixing wrong target level being passed during Core DVFS. Date: Thu, 18 Feb 2010 14:01:06 +0530 Message-Id: <1266481866-10875-1-git-send-email-thara@ti.com> X-Mailer: git-send-email 1.5.5 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]); Thu, 18 Feb 2010 08:31:17 +0000 (UTC) diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index 3604a38..d2336d8 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -463,6 +463,7 @@ int set_opp(struct shared_resource *resp, u32 target_level) } else if (resp == vdd2_resp) { unsigned long req_l3_freq; struct omap_opp *oppx = NULL; + u8 opp; /* Convert the tput in KiB/s to Bus frequency in MHz */ req_l3_freq = (target_level * 1000)/4; @@ -478,10 +479,11 @@ int set_opp(struct shared_resource *resp, u32 target_level) /* uh uh.. no OPPs?? */ BUG_ON(IS_ERR(oppx)); - ret = freq_to_opp((u8 *)&target_level, OPP_L3, req_l3_freq); + ret = freq_to_opp(&opp, OPP_L3, req_l3_freq); /* we dont expect this to fail */ BUG_ON(ret); + target_level = opp; ret = resource_set_opp_level(VDD2_OPP, target_level, 0); } return 0;