Re: [PATCH 12/11] OMAP: PM: CPUfreq: obey min/max settings of policy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yes, this is patch 12 of 11. :)

It's an extra patch that should've been included in the original
series.

Kevin

Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx> writes:

> From: Eero Nurkkala <ext-eero.nurkkala@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> ---
>  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 843e8af..1868c0d 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,
>  
>  	/* 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;
> -- 
> 1.6.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux