Commit fb3b1fefaaccdbdc716db0963ba41fb6b4221e60

Authored by Mark Brown
Committed by Dave Jones
1 parent c6e2d68558

[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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Dave Jones <davej@redhat.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/cpufreq/s3c64xx-cpufreq.c
... ... @@ -112,6 +112,8 @@
112 112 goto err;
113 113 }
114 114  
  115 + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
  116 +
115 117 #ifdef CONFIG_REGULATOR
116 118 if (vddarm && freqs.new < freqs.old) {
117 119 ret = regulator_set_voltage(vddarm,
... ... @@ -124,8 +126,6 @@
124 126 }
125 127 }
126 128 #endif
127   -
128   - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
129 129  
130 130 pr_debug("cpufreq: Set actual frequency %lukHz\n",
131 131 clk_get_rate(armclk) / 1000);