From patchwork Thu Nov 19 11:25:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "G.N, Vijayakumar" X-Patchwork-Id: 61276 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 nAJBP89X004999 for ; Thu, 19 Nov 2009 11:25:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751011AbZKSLZs (ORCPT ); Thu, 19 Nov 2009 06:25:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751445AbZKSLZs (ORCPT ); Thu, 19 Nov 2009 06:25:48 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:40919 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbZKSLZr convert rfc822-to-8bit (ORCPT ); Thu, 19 Nov 2009 06:25:47 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAJBPoWc023327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 Nov 2009 05:25:52 -0600 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id nAJBPnq6003357; Thu, 19 Nov 2009 16:55:49 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Thu, 19 Nov 2009 16:55:50 +0530 From: "G.N, Vijayakumar" To: "khilman@deeprootsystems.com" , "linux-omap@vger.kernel.org" Date: Thu, 19 Nov 2009 16:55:14 +0530 Subject: [PATCH 2/3] omap3: pm: removes hardcoded VDD1/2 OPP values and make threshold generic Thread-Topic: [PATCH 2/3] omap3: pm: removes hardcoded VDD1/2 OPP values and make threshold generic Thread-Index: AcpiJScoehTmBzjdTlSovq1LrOQUJwG3tlSgAAGrD6AAAAz/0A== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index cc85601..3bdb1f9 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -372,7 +372,7 @@ int set_opp(struct shared_resource *resp, u32 target_level) int ind; if (resp == vdd1_resp) { - if (target_level < 3) + if (target_level < MAX_VDD2_OPP) resource_release("vdd2_opp", &vdd2_dev); resource_set_opp_level(VDD1_OPP, target_level, 0); @@ -381,7 +381,7 @@ int set_opp(struct shared_resource *resp, u32 target_level) * is at 100Mhz or above. * throughput in KiB/s for 100 Mhz = 100 * 1000 * 4. */ - if (target_level >= 3) + if (target_level > MIN_VDD2_OPP) resource_request("vdd2_opp", &vdd2_dev, (4 * (l3_opps + MAX_VDD2_OPP)->rate / 1000)); @@ -391,7 +391,7 @@ int set_opp(struct shared_resource *resp, u32 target_level) /* Convert the tput in KiB/s to Bus frequency in MHz */ req_l3_freq = (tput * 1000)/4; - for (ind = 2; ind <= MAX_VDD2_OPP; ind++) + for (ind = MIN_VDD2_OPP; ind <= MAX_VDD2_OPP; ind++) if ((l3_opps + ind)->rate >= req_l3_freq) { target_level = ind; break;