diff options
author | Matt Wagner <mwagner@nvidia.com> | 2013-04-11 16:57:36 -0700 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2013-04-12 18:10:25 -0700 |
commit | 81c5cd28d6024304c40fd85789e469f37193485b (patch) | |
tree | 711ebfa269b6b09a113c4236de9475339b2c04ac /arch/arm/mach-tegra/cpuquiet.c | |
parent | 9ea2381b96a4e4ab152bec8da9bb6830cce00a40 (diff) |
ARM: tegra: cpuquiet: Add Margin to Clock Calculation
Added 30Mhz offset when using the maximum clock on LP
due to a rounding issue that causes us to fail entry to LP on high load.
Bug 1253920
Change-Id: Ibca5451d426d8e3458a9ad0a91b720238567a752
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/218998
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'arch/arm/mach-tegra/cpuquiet.c')
-rw-r--r-- | arch/arm/mach-tegra/cpuquiet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/cpuquiet.c b/arch/arm/mach-tegra/cpuquiet.c index b40d23e46e35..4282d08bc8a1 100644 --- a/arch/arm/mach-tegra/cpuquiet.c +++ b/arch/arm/mach-tegra/cpuquiet.c @@ -273,8 +273,12 @@ static int __apply_cluster_config(int state, int target_state) } else if (target_state == TEGRA_CPQ_LP && no_lp != 1 && num_online_cpus() == 1) { + /* Margin of 30Mhz is required since max_lp_clk is 816Mhz + * which will round up to 817Mhz on the G cluster, and + * cause us to fail switching to the LP cluster because + * the frequency is too high */ speed = min((unsigned long)tegra_getspeed(0), - clk_get_max_rate(cpu_lp_clk) / 1000); + clk_get_max_rate(cpu_lp_clk) / 1000 - 30000); tegra_update_cpu_speed(speed); if (!tegra_cluster_switch(cpu_clk, cpu_lp_clk)) { |