From patchwork Fri Jan 21 14:00:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishwanath BS X-Patchwork-Id: 8 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:39:12 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.10 with SMTP id b10cs148468yan; Fri, 21 Jan 2011 05:57:44 -0800 (PST) Received: by 10.101.69.10 with SMTP id w10mr498705ank.144.1295618264702; Fri, 21 Jan 2011 05:57:44 -0800 (PST) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by mx.google.com with ESMTPS id g28si21515708anh.152.2011.01.21.05.57.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 21 Jan 2011 05:57:44 -0800 (PST) Received-SPF: pass (google.com: domain of vishwanath.bs@ti.com designates 198.47.26.152 as permitted sender) client-ip=198.47.26.152; Authentication-Results: mx.google.com; spf=pass (google.com: domain of vishwanath.bs@ti.com designates 198.47.26.152 as permitted sender) smtp.mail=vishwanath.bs@ti.com Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p0LDvfJC000509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Jan 2011 07:57:43 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p0LDvSPW010507; Fri, 21 Jan 2011 19:27:40 +0530 (IST) From: Vishwanath BS To: linux-omap@vger.kernel.org Cc: patches@linaro.org, Thara Gopinath , Vishwanath BS Subject: [PATCH 06/13] OMAP: Disable Smartreflex across DVFS Date: Fri, 21 Jan 2011 19:30:58 +0530 Message-Id: <1295618465-15234-7-git-send-email-vishwanath.bs@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1295618465-15234-1-git-send-email-vishwanath.bs@ti.com> References: <1295618465-15234-1-git-send-email-vishwanath.bs@ti.com> From: Thara Gopinath This patch disables smartreflex for a particular voltage domain when the the voltage domain and the devices belonging to it is being scaled and re-enables it back once the scaling is done. Signed-off-by: Thara Gopinath Signed-off-by: Vishwanath BS --- arch/arm/mach-omap2/dvfs.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c index 05a9ce3..1e5492c 100755 --- a/arch/arm/mach-omap2/dvfs.c +++ b/arch/arm/mach-omap2/dvfs.c @@ -529,6 +529,9 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) curr_volt = omap_voltage_get_nom_volt(voltdm); + /* Disable smartreflex module across voltage and frequency scaling */ + omap_sr_disable(voltdm); + if (curr_volt == volt) { is_volt_scaled = 1; } else if (curr_volt < volt) { @@ -536,6 +539,7 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) if (ret) { pr_warning("%s: Unable to scale the %s to %ld volt\n", __func__, voltdm->name, volt); + omap_sr_enable(voltdm); mutex_unlock(&dvfs_info->scaling_mutex); return ret; } @@ -570,6 +574,9 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) if (!is_volt_scaled && !ret) omap_voltage_scale_vdd(voltdm, volt); + /* Enable Smartreflex module */ + omap_sr_enable(voltdm); + mutex_unlock(&dvfs_info->scaling_mutex); /* calculate the voltages for dependent vdd's */