summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/cpuidle-t11x.c
diff options
context:
space:
mode:
authorBo Yan <byan@nvidia.com>2013-01-15 14:06:27 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:51:35 -0700
commit39c07de706aa03811411c1393679c69ea24fa152 (patch)
tree53519024f1621174c1ddb9172c59ebea629a71d4 /arch/arm/mach-tegra/cpuidle-t11x.c
parentfda019710568b7f7478ee151282886452f49ec63 (diff)
ARM: tegra11x: Raise clock rate for C1NC power gating
The C1NC power gating has long latency when slow cpu runs at very low clock rate. Raising it to 204MHz can reduce this latency significantly. The CPU clock is reverted back to its original value once slow CPU wakes up. bug 1177454 Change-Id: Idc6122f0a2ba8ad35c963942c60e9cf4a4f0b0c2 Signed-off-by: Bo Yan <byan@nvidia.com> Reviewed-on: http://git-master/r/193501 (cherry picked from commit a71665bb3ddb437536cec00be91e9b201414fc93) Reviewed-on: http://git-master/r/191455 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle-t11x.c')
-rw-r--r--arch/arm/mach-tegra/cpuidle-t11x.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-t11x.c b/arch/arm/mach-tegra/cpuidle-t11x.c
index 8004518a550e..9f2d94e223e2 100644
--- a/arch/arm/mach-tegra/cpuidle-t11x.c
+++ b/arch/arm/mach-tegra/cpuidle-t11x.c
@@ -3,7 +3,7 @@
*
* CPU idle driver for Tegra11x CPUs
*
- * Copyright (c) 2012, NVIDIA Corporation.
+ * Copyright (c) 2012-2013, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -470,6 +470,8 @@ bool tegra11x_idle_power_down(struct cpuidle_device *dev,
bool power_down;
bool cpu_gating_only = false;
bool power_gating_cpu_only = true;
+ int status = -1;
+ unsigned long rate = ULONG_MAX;
s64 request = ktime_to_us(tick_nohz_get_sleep_length());
tegra_set_cpu_in_pd(dev->cpu);
@@ -498,9 +500,17 @@ bool tegra11x_idle_power_down(struct cpuidle_device *dev,
if (power_gating_cpu_only)
power_down = tegra_cpu_core_power_down(dev, state, request);
- else
+ else {
+ if (is_lp_cluster())
+ status = tegra_cpu_backup_rate_exchange(&rate);
+
power_down = tegra_cpu_cluster_power_down(dev, state, request);
+ /* restore cpu clock after cluster power ungating */
+ if (status == 0)
+ tegra_cpu_backup_rate_exchange(&rate);
+ }
+
tegra_clear_cpu_in_pd(dev->cpu);
return power_down;