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

Commit 6f35a65f authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki
Browse files

cpufreq: SPEAr: Notify all policy->cpus of frequency change



SPEAr cpufreq driver supports dual core Cortex-A9 SoC's, where cpus share policy
structure. Whenever we update frequency of a cpu, we must notify all
policy->cpus.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 951fc5f4
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -157,6 +157,8 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy,


	freqs.new = newfreq / 1000;
	freqs.new = newfreq / 1000;
	freqs.new /= mult;
	freqs.new /= mult;

	for_each_cpu(freqs.cpu, policy->cpus)
		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);


	if (mult == 2)
	if (mult == 2)
@@ -170,6 +172,7 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy,
		freqs.new = clk_get_rate(spear_cpufreq.clk) / 1000;
		freqs.new = clk_get_rate(spear_cpufreq.clk) / 1000;
	}
	}


	for_each_cpu(freqs.cpu, policy->cpus)
		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
	return ret;
	return ret;
}
}