On Wed, May 25, 2011 at 04:38:49PM -0700, Nishanth Menon wrote:
> OMAP2+ all have frequency tables, hence the hacks we had for older
> silicon do not need to be carried forward. As part of this change,
> use cpufreq_frequency_table_target to find the best match for
> frequency requested.
> 
> Signed-off-by: Nishanth Menon <n...@ti.com>
...
> @@ -79,22 +66,35 @@ static int omap_target(struct cpufreq_policy *policy,
>                      unsigned int target_freq,
>                      unsigned int relation)
>  {
> -     int i, ret = 0;
> +     unsigned int i;
> +     int ret = 0;
>       struct cpufreq_freqs freqs;
>  
>       /* Changes not allowed until all CPUs are online */
>       if (is_smp() && (num_online_cpus() < NR_CPUS))
>               return ret;
>  
> -     /* Ensure desired rate is within allowed range.  Some govenors
> -      * (ondemand) will just pass target_freq=0 to get the minimum. */
> -     if (target_freq < policy->min)
> -             target_freq = policy->min;
> -     if (target_freq > policy->max)
> -             target_freq = policy->max;
> +     if (!freq_table) {
> +             dev_err(mpu_dev, "%s: cpu%d: no freq table!\n", __func__,
> +                             policy->cpu);

Just a minor comment: suggest dev_dbg() or WARN_ONCE() for some of
these conditions that may be frequently evaluated and probably won't
be cleared up after being hit once.

...

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

Reply via email to