summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThara Gopinath <thara@ti.com>2011-01-21 15:32:30 +0530
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-02-21 23:10:40 -0500
commitc00ae4ac1e16e11cb9bd69703614d32df203b688 (patch)
tree525ffb0860462e92c56d6fe19420ec294217c777
parentdef12feea28270116be43242e9f807107fd717b5 (diff)
OMAP: Disable Smartreflex across DVFS
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 <thara@ti.com> Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
-rw-r--r--arch/arm/mach-omap2/dvfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c
index 05a9ce3767b..1e5492c2ecb 100644
--- 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 */