]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: armada-37xx: fix frequency calculation for opp
authorGregory CLEMENT <gregory.clement@bootlin.com>
Fri, 8 Mar 2019 16:47:10 +0000 (17:47 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 29 Apr 2019 09:52:50 +0000 (15:22 +0530)
commit9eefc373baf4169413b33d5a13be3140b1c6c2d1
treef0a4fd8f06fabeefb68fa5f4471c8187cf38fce6
parentff5870eed474d3b81466f2ad710d669ebc0a9978
cpufreq: armada-37xx: fix frequency calculation for opp

The frequency calculation was based on the current(max) frequency of the
CPU. However for low frequency, the value used was already the parent
frequency divided by a factor of 2.

Instead of using this frequency, this fix directly get the frequency from
the parent clock.

Fixes: 55695ee33008 ("cpufreq: Add DVFS support for Armada 37xx")
Cc: <stable@vger.kernel.org>
Reported-by: Christian Neubert <christian.neubert.86@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/armada-37xx-cpufreq.c