diff options
author | Eero Nurkkala <ext-eero.nurkkala@nokia.com> | 2009-06-23 05:53:29 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-08-05 12:10:54 -0400 |
commit | 60c45ae1107c4ec47d2c84e5984ea59d02b2863d (patch) | |
tree | 57e5de3a50d44b9f00958bca478e7a1cff61a15f /arch/arm | |
parent | bcf396c48012a5e4c7ab77be5c40df10d6bdb8ad (diff) |
OMAP: PM: CPUfreq: obey min/max settings of policy
Use the min/max settings from CPUfreq policy rather than
processor defined min/max settings.
Without this patch, it's possible to scale frequency outside
the current policy range.
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/plat-omap/cpu-omap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index 843e8af64066..1868c0d8f9b5 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -78,10 +78,10 @@ static int omap_target(struct cpufreq_policy *policy, | |||
78 | 78 | ||
79 | /* Ensure desired rate is within allowed range. Some govenors | 79 | /* Ensure desired rate is within allowed range. Some govenors |
80 | * (ondemand) will just pass target_freq=0 to get the minimum. */ | 80 | * (ondemand) will just pass target_freq=0 to get the minimum. */ |
81 | if (target_freq < policy->cpuinfo.min_freq) | 81 | if (target_freq < policy->min) |
82 | target_freq = policy->cpuinfo.min_freq; | 82 | target_freq = policy->min; |
83 | if (target_freq > policy->cpuinfo.max_freq) | 83 | if (target_freq > policy->max) |
84 | target_freq = policy->cpuinfo.max_freq; | 84 | target_freq = policy->max; |
85 | 85 | ||
86 | freqs.old = omap_getspeed(0); | 86 | freqs.old = omap_getspeed(0); |
87 | freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; | 87 | freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; |