diff options
author | Bo Yan <byan@nvidia.com> | 2013-10-31 22:17:06 -0700 |
---|---|---|
committer | Bo Yan <byan@nvidia.com> | 2013-11-01 09:54:00 -0700 |
commit | fa48d817841ec71d7d890fa79aa9bf55fc032ff7 (patch) | |
tree | 000757a8075aaf7f9c44f27b9f84a0c774da960c | |
parent | af65d05c7c0de9b96eb2d323b126d34088ef56b5 (diff) |
arm: tegra: do not read cntfrq register
cntfrq register is not initialized, reading from it returns garbage
value. instead, just call the measurement function
tegra_clk_measure_input_freq, which returns the same frequency.
Change-Id: If2229808686dae76bb92088b4e6540c979b7643f
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/323826
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
-rw-r--r-- | arch/arm/mach-tegra/cpuidle-t11x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-t11x.c b/arch/arm/mach-tegra/cpuidle-t11x.c index 320959eb9c72..1b8e639b6ab4 100644 --- a/arch/arm/mach-tegra/cpuidle-t11x.c +++ b/arch/arm/mach-tegra/cpuidle-t11x.c @@ -420,7 +420,7 @@ static bool tegra_cpu_core_power_down(struct cpuidle_device *dev, } #ifdef CONFIG_TEGRA_LP2_CPU_TIMER - asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (cntfrq)); + cntfrq = tegra_clk_measure_input_freq(); cntp_tval = (request - state->exit_latency) * (cntfrq / 1000000); asm volatile("mcr p15, 0, %0, c14, c2, 0" : : "r"(cntp_tval)); #endif |