summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/cpu-tegra.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-03-11 00:02:33 -0800
committerSimone Willett <swillett@nvidia.com>2012-04-03 17:39:40 -0700
commit7ddd7f619e68d0c1fc8665e6a9b72db292ac752a (patch)
treed05346f20526c146d6d31223ee92868eff63ac84 /arch/arm/mach-tegra/cpu-tegra.c
parent29138fed490457ed2f8abb656cae716e570808a3 (diff)
power: bpcm: Re-try setting BPC limit
Check returned value from BPC set limit api, and re-try again on error. Keep CPU throttled while re-trying. Signed-off-by: Alex Frid <afrid@nvidia.com> (cherry picked from commit 8d5e5a36a03587e3e9374ad8cec6958bd3617f0c) Change-Id: I29b24a92b87cbd41d68473d0c9ef4c8d6add992f Reviewed-on: http://git-master/r/93732 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra.c')
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index b4ba093952c7..d35c18e533d9 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -262,13 +262,15 @@ int tegra_system_edp_alarm(bool alarm)
system_edp_alarm = alarm;
/* Update cpu rate if cpufreq (at least on cpu0) is already started
- and cancel emergency throttling after edp limit is applied */
+ and cancel emergency throttling after either edp limit is applied
+ or alarm is canceled */
if (target_cpu_speed[0]) {
edp_update_limit();
ret = tegra_cpu_set_speed_cap(NULL);
- if (!ret && alarm)
- tegra_edp_throttle_cpu_now(0);
}
+ if (!ret || !alarm)
+ tegra_edp_throttle_cpu_now(0);
+
mutex_unlock(&tegra_cpu_lock);
return ret;