diff options
author | Alex Frid <afrid@nvidia.com> | 2011-03-30 18:02:13 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:28 -0800 |
commit | c9d858f72439e17ec152664f9164c99878ce4b65 (patch) | |
tree | a14913065d68c1a99d68d3210122aa299c272c59 /arch/arm/mach-tegra/cpu-tegra.c | |
parent | 8d8a6fb8d0455174bd6619dd0ea5a97ef92fffb1 (diff) |
ARM: tegra: clock: Add Tegra3 CPU clock round rate operation
Original-Change-Id: I9e10c8d4ed074f915769ae7c77d915d6b021e2c9
Reviewed-on: http://git-master/r/24892
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Original-Change-Id: I23820e1557d304d7a99417b99afaeb4a36c9d18f
Rebase-Id: Re1b1e4f589376f52c1e9cf903ceaee7efe798ba1
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); |