Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e74b75d7 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: Move governor-per-policy parsing before parsing freq table



Even if all CPUs share same frequency table, there might still be use
case where governor-per-policy is useful. Move it before returning
from parsing common CPU freq table.

Change-Id: I0254dd4d09b6ea6595a183207da036b224c90f04
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 9e91c0c5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -438,6 +438,10 @@ static int __init msm_cpufreq_probe(struct platform_device *pdev)
	}
	hotplug_ready = true;

	/* Use per-policy governor tunable for some targets */
	if (of_property_read_bool(dev->of_node, "qcom,governor-per-policy"))
		msm_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY;

	/* Parse commong cpufreq table for all CPUs */
	ftbl = cpufreq_parse_dt(dev, "qcom,cpufreq-table", 0);
	if (!IS_ERR(ftbl)) {
@@ -483,10 +487,6 @@ static int __init msm_cpufreq_probe(struct platform_device *pdev)
		per_cpu(freq_table, cpu) = ftbl;
	}

	/* Use per-policy governor tunable for some targets */
	if (of_property_read_bool(dev->of_node, "qcom,governor-per-policy"))
		msm_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY;

	return 0;
}