|
@@ -147,7 +147,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
|
|
|
struct clk *cpu_clk;
|
|
|
struct dev_pm_opp *suspend_opp;
|
|
|
unsigned int transition_latency;
|
|
|
- bool opp_v1 = false;
|
|
|
+ bool fallback = false;
|
|
|
const char *name;
|
|
|
int ret;
|
|
|
|
|
@@ -167,14 +167,16 @@ static int cpufreq_init(struct cpufreq_policy *policy)
|
|
|
/* Get OPP-sharing information from "operating-points-v2" bindings */
|
|
|
ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus);
|
|
|
if (ret) {
|
|
|
+ if (ret != -ENOENT)
|
|
|
+ goto out_put_clk;
|
|
|
+
|
|
|
/*
|
|
|
* operating-points-v2 not supported, fallback to old method of
|
|
|
- * finding shared-OPPs for backward compatibility.
|
|
|
+ * finding shared-OPPs for backward compatibility if the
|
|
|
+ * platform hasn't set sharing CPUs.
|
|
|
*/
|
|
|
- if (ret == -ENOENT)
|
|
|
- opp_v1 = true;
|
|
|
- else
|
|
|
- goto out_put_clk;
|
|
|
+ if (dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus))
|
|
|
+ fallback = true;
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -214,7 +216,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
|
|
|
goto out_free_opp;
|
|
|
}
|
|
|
|
|
|
- if (opp_v1) {
|
|
|
+ if (fallback) {
|
|
|
struct cpufreq_dt_platform_data *pd = cpufreq_get_driver_data();
|
|
|
|
|
|
if (!pd || !pd->independent_clocks)
|