public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: ext-eero.nurkkala@nokia.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP: PM: Correct the use of cpufreq
Date: Thu, 25 Jun 2009 09:48:24 -0700	[thread overview]
Message-ID: <87ws70qmxz.fsf@deeprootsystems.com> (raw)
In-Reply-To: <12457508091766-git-send-email-ext-eero.nurkkala@nokia.com> (ext-eero nurkkala's message of "Tue\, 23 Jun 2009 12\:53\:29 +0300")

ext-eero.nurkkala@nokia.com writes:

> From: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
>
> 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.
>
> Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>

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

Kevin

> ---
>  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.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-06-25 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23  9:53 [PATCH] OMAP: PM: Correct the use of cpufreq ext-eero.nurkkala
2009-06-25 16:48 ` Kevin Hilman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ws70qmxz.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=ext-eero.nurkkala@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox