Skip to content
Commit a60a5567 authored by Sumit Gupta's avatar Sumit Gupta Committed by Viresh Kumar
Browse files

cpufreq: tegra194: use refclk delta based loop instead of udelay



Use reference clock count based loop instead of "udelay()" for
sampling of counters to improve the accuracy of re-generated CPU
frequency. "udelay()" internally calls "WFE" which stops the
counters and results in bigger delta between the last set freq
and the re-generated value from counters. The counter sampling
window used in loop is the minimum number of reference clock
cycles which is known to give a stable value of CPU frequency.
The change also helps to reduce the sampling window from "500us"
to "<50us".

Suggested-by: default avatarAntti Miettinen <amiettinen@nvidia.com>
Signed-off-by: default avatarSumit Gupta <sumitg@nvidia.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 6b121b4c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment