Skip to contentSkip to conversation

OMAP: PM: Correct the use of cpufreq

PATCH In review [email protected] 2 participants 2 messages Jun 23, 2009 – Jun 25, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP: PM: Correct the use of cpufreq

From: Eero Nurkkala <[email protected]>

Wrong info was used to feed the cpufreq. It is possible now to get below the user defined limit defined at "/cpufreq/scaling_min_freq". With this patch, the user defined limits are being obeyed instead of always using the absolute max and min values supported by the device.

---
 arch/arm/plat-omap/cpu-omap.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/cpu-omap.c +4 -4
index 843e8af..1868c0d 100644
@@ -78,10 +78,10 @@ static int omap_target(struct cpufreq_policy *policy,
 
 	/* Ensure desired rate is within allowed range.  Some govenors
 	 * (ondemand) will just pass target_freq=0 to get the minimum. */
-	if (target_freq < policy->cpuinfo.min_freq)
-		target_freq = policy->cpuinfo.min_freq;
-	if (target_freq > policy->cpuinfo.max_freq)
-		target_freq = policy->cpuinfo.max_freq;
+	if (target_freq < policy->min)
+		target_freq = policy->min;
+	if (target_freq > policy->max)
+		target_freq = policy->max;
 
 	freqs.old = omap_getspeed(0);
 	freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 10 lines · [email protected] writes:

From: Eero Nurkkala <[email protected]>

Wrong info was used to feed the cpufreq. It is possible now to get below the user defined limit defined at "/cpufreq/scaling_min_freq". With this patch, the user defined limits are being obeyed instead of always using the absolute max and min values supported by the device.

Thanks, pushing to current PM branch, and backporting to pm-2.6.29.

Kevin

Quoted 30 lines
---
 arch/arm/plat-omap/cpu-omap.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/cpu-omap.c +4 -4
index 843e8af..1868c0d 100644
@@ -78,10 +78,10 @@ static int omap_target(struct cpufreq_policy *policy,
 
 	/* Ensure desired rate is within allowed range.  Some govenors
 	 * (ondemand) will just pass target_freq=0 to get the minimum. */
-	if (target_freq < policy->cpuinfo.min_freq)
-		target_freq = policy->cpuinfo.min_freq;
-	if (target_freq > policy->cpuinfo.max_freq)
-		target_freq = policy->cpuinfo.max_freq;
+	if (target_freq < policy->min)
+		target_freq = policy->min;
+	if (target_freq > policy->max)
+		target_freq = policy->max;
 
 	freqs.old = omap_getspeed(0);
 	freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
Signature · 6 lines
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html