cpufreq: dt: Add support to check initial rate and voltage

If there is only one opp whose frequency is equal to initial
frequency, the cpu voltage will not be changed and the initial
voltage may be higher than opp's voltage.

Change-Id: Iea239a050d3f8a6b242ddf5c92699df7487c1285
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
Finley Xiao 2019-06-13 10:51:14 +08:00 committed by Tao Huang
parent ea6bc886b8
commit 10205ac8e4

View File

@ -27,6 +27,9 @@
#include <linux/thermal.h>
#include "cpufreq-dt.h"
#ifdef CONFIG_ARCH_ROCKCHIP
#include "rockchip-cpufreq.h"
#endif
struct private_data {
struct opp_table *opp_table;
@ -306,6 +309,9 @@ static int cpufreq_init(struct cpufreq_policy *policy)
em_register_perf_domain(policy->cpus, nr_opp, &em_cb);
#ifdef CONFIG_ARCH_ROCKCHIP
rockchip_cpufreq_check_rate_volt(cpu_dev);
#endif
return 0;
out_free_cpufreq_table: