diff options
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra.c')
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra.c | 6 |
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 fbca349a9fe4..afdec503f034 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -211,6 +211,10 @@ static int tegra_update_cpu_speed(unsigned long rate) freqs.old = tegra_getspeed(0); freqs.new = rate; + rate = clk_round_rate(cpu_clk, rate * 1000); + if (!IS_ERR_VALUE(rate)) + freqs.new = rate / 1000; + if (freqs.old == freqs.new) return ret; @@ -218,7 +222,7 @@ 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(rate)); + clk_set_rate(emc_clk, tegra_emc_to_cpu_ratio(freqs.new)); for_each_online_cpu(freqs.cpu) cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |