cpufreq: armada-37xx: Fix determining base CPU frequency

[ Upstream commit 8bad3bf23cbc40abe1d24cec08a114df6facf858 ]

When current CPU load is not L0 then loading armada-37xx-cpufreq.ko driver
fails with following error:

    # modprobe armada-37xx-cpufreq
    [  502.702097] Unsupported CPU frequency 250 MHz

This issue was partially fixed by commit 8db8256345 ("cpufreq:
armada-37xx: fix frequency calculation for opp"), but only for calculating
CPU frequency for opp.

Fix this also for determination of base CPU frequency.

Signed-off-by: Pali Rohár <[email protected]>
Acked-by: Gregory CLEMENT <[email protected]>
Tested-by: Tomasz Maciej Nowak <[email protected]>
Tested-by: Anders Trier Olesen <[email protected]>
Tested-by: Philip Soares <[email protected]>
Fixes: 92ce45fb87 ("cpufreq: Add DVFS support for Armada 37xx")
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
Pali Rohár 2021-04-08 13:42:21 +02:00 • committed by Greg Kroah-Hartman
commit eaf03935b8

View file

@ -469,7 +469,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
return -EINVAL;
}
dvfs = armada_37xx_cpu_freq_info_get(cur_frequency);
dvfs = armada_37xx_cpu_freq_info_get(base_frequency);
if (!dvfs) {
clk_put(clk);
return -EINVAL;