Commit fb3b1fef authored by Mark Brown's avatar Mark Brown Committed by Dave Jones

[CPUFREQ] S3C64xx: Notify transition complete as soon as frequency changed

The CPUFREQ_POSTCHANGE notification is used to update things that depend on
the system clock rates. Since this may include the interfaces used to talk
to the regulators do the notification before we try to update regulators
to reflect lowered system clock rate.

The voltage scaling is just a power optimisation and may not happen at all
so there's no concern about it not having completed.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent c6e2d685
...@@ -112,6 +112,8 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, ...@@ -112,6 +112,8 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
goto err; goto err;
} }
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
#ifdef CONFIG_REGULATOR #ifdef CONFIG_REGULATOR
if (vddarm && freqs.new < freqs.old) { if (vddarm && freqs.new < freqs.old) {
ret = regulator_set_voltage(vddarm, ret = regulator_set_voltage(vddarm,
...@@ -125,8 +127,6 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, ...@@ -125,8 +127,6 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
} }
#endif #endif
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
pr_debug("cpufreq: Set actual frequency %lukHz\n", pr_debug("cpufreq: Set actual frequency %lukHz\n",
clk_get_rate(armclk) / 1000); clk_get_rate(armclk) / 1000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment