clk: msm: clock-osm: increase refcount of CPU clocks at probe time
Increase the refcount of CPU clocks proportionally to the number of available CPUs to maintain the assumption that each CPU clock has been prepared and enabled by the time cpufreq takes over. Change-Id: Icccb28bc7a88dc76cf4ed5710623e992ba62f19c CRs-Fixed: 994035 Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
This commit is contained in:
parent
3a0f40b5ef
commit
05a8698e52
1 changed files with 9 additions and 5 deletions
|
@ -2169,7 +2169,7 @@ static int cpu_clock_osm_driver_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
char perfclspeedbinstr[] = "qcom,perfcl-speedbin0-v0";
|
char perfclspeedbinstr[] = "qcom,perfcl-speedbin0-v0";
|
||||||
char pwrclspeedbinstr[] = "qcom,pwrcl-speedbin0-v0";
|
char pwrclspeedbinstr[] = "qcom,pwrcl-speedbin0-v0";
|
||||||
int rc;
|
int rc, cpu;
|
||||||
|
|
||||||
rc = clk_osm_resources_init(pdev);
|
rc = clk_osm_resources_init(pdev);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@ -2347,11 +2347,13 @@ static int cpu_clock_osm_driver_probe(struct platform_device *pdev)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_online_cpus();
|
||||||
|
|
||||||
/* Enable OSM */
|
/* Enable OSM */
|
||||||
WARN(clk_prepare_enable(&pwrcl_clk.c),
|
for_each_online_cpu(cpu) {
|
||||||
"Failed to enable power cluster clock\n");
|
WARN(clk_prepare_enable(logical_cpu_to_clk(cpu)),
|
||||||
WARN(clk_prepare_enable(&perfcl_clk.c),
|
"Failed to enable clock for cpu %d\n", cpu);
|
||||||
"Failed to enable perf cluster clock\n");
|
}
|
||||||
|
|
||||||
populate_opp_table(pdev);
|
populate_opp_table(pdev);
|
||||||
populate_debugfs_dir(&pwrcl_clk);
|
populate_debugfs_dir(&pwrcl_clk);
|
||||||
|
@ -2360,6 +2362,8 @@ static int cpu_clock_osm_driver_probe(struct platform_device *pdev)
|
||||||
of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
|
of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
|
||||||
|
|
||||||
pr_info("OSM driver inited\n");
|
pr_info("OSM driver inited\n");
|
||||||
|
put_online_cpus();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
Loading…
Add table
Reference in a new issue