]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2019 05:49:54 +0000 (07:49 +0200)
commitf6ad5c7d15ea2203e2f69a0a3e264428c2a23825
tree651701f5d7e79a1b64612d6ac0ca660c31e6d5eb
parent3a8fc4fad97d3b997388d14f899a55531773b3ab
cpufreq: armada-37xx: fix frequency calculation for opp

commit 8db82563451f976597ab7b282ec655e4390a4088 upstream.

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: 92ce45fb875d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/armada-37xx-cpufreq.c