path: root/arch/arm/mach-tegra/cpu-tegra.c
diff options
authorAlex Frid <>2011-09-26 22:47:02 -0700
committerDan Willemsen <>2011-11-30 21:49:40 -0800
commit4863ff67b8c78a0bcf0a6d052a9bd14d135dd2cd (patch)
treee1109d257b01320d951ec13693a5fc2be17fbdfb /arch/arm/mach-tegra/cpu-tegra.c
parent6c6f3f7d9e1e27ea2bc1195d8eb2bd995b9ef6b3 (diff)
ARM: tegra: clock: Order memory and cpu clock updates
When voting on memory frequency based on cpu frequency, update memory frequency before cpu frequency if cpu rate is increasing, and after cpu frequency if cpu rate is decreasing (current code updates memory first always). (cherry picked from commit 9284039a4d86c22ee72e11d6c173b24a5b4f720e) (cherry picked from commit 3cd676121913b1cd9eddff06d6966817dcd9de94) Change-Id: I91b81f1eab91d575959a2fd9af3a8798f7ca6cf6 Reviewed-on: http://git-master/r/61707 Reviewed-by: Varun Colbert <> Tested-by: Varun Colbert <> Rebase-Id: R64d5597f8360ca151ba5e017cb94915c63699aca
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra.c')
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index 7ff2a4143280..90745de96c6b 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -360,7 +360,8 @@ static int tegra_update_cpu_speed(unsigned long rate)
* Vote on memory bus frequency based on cpu frequency
* This sets the minimum frequency, display or avp may request higher
- clk_set_rate(emc_clk, tegra_emc_to_cpu_ratio(;
+ if (freqs.old <
+ clk_set_rate(emc_clk, tegra_emc_to_cpu_ratio(;
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
@@ -380,6 +381,9 @@ static int tegra_update_cpu_speed(unsigned long rate)
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+ if (freqs.old >
+ clk_set_rate(emc_clk, tegra_emc_to_cpu_ratio(;
return 0;