S3C64xx: Notify transition complete as soon as frequency changed
Subsystems (2)
PATCH 1/1 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.
--- drivers/cpufreq/s3c64xx-cpufreq.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/s3c64xx-cpufreq.c +2 -2
@@ -114,6 +114,8 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, goto err; } +cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); +#ifdef CONFIG_REGULATOR if (vddarm && freqs.new < freqs.old) { ret = regulator_set_voltage(vddarm,
@@ -127,8 +129,6 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, }#endif -cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); -pr_debug ("cpufreq: Set actual frequency %lukHz\n" ,clk_get_rate (armclk) /1000 );
Signature · 1 line
1.7.5.4
Quoted 11 lines · Mark Brown
The
CPUFREQ_POSTCHANGEnotification 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 <[email protected]>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Review
Quoted 5 lines
--- drivers/cpufreq/s3c64xx-cpufreq.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/cpufreq/s3c64xx-cpufreq.c
Quoted 25 lines
index c370935..b8d1d20 100644
drivers/cpufreq/s3c64xx-cpufreq.c +2
-0@@ -114,6 +114,8 @@ static int s3c64xx_cpufreq_set_target(structcpufreq_policy *policy, goto err; } +cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); +#ifdef CONFIG_REGULATOR if (vddarm && freqs.new < freqs.old) {drivers/cpufreq/s3c64xx-cpufreq.c +0
-3ret = regulator_set_voltage(vddarm,@@ -127,8 +129,6 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, }#endif -cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); -pr_debug ("cpufreq: Set actual frequency %lukHz\n" ,clk_get_rate (armclk) /1000 ); --1.7.5.4