RE: [PATCH 2/3] omap: cpufreq: Split omap1 and omap2plus cpufreq drivers.

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

 



> -----Original Message-----
> From: Vishwanath Sripathy [mailto:vishwanath.bs@xxxxxx]
> Sent: Friday, February 25, 2011 12:47 PM
> To: Santosh Shilimkar; linux-omap@xxxxxxxxxxxxxxx
> Cc: Kevin Hilman
> Subject: RE: [PATCH 2/3] omap: cpufreq: Split omap1 and omap2plus
> cpufreq drivers.
>
[....]

> > @@ -101,33 +84,44 @@ static int omap_target(struct cpufreq_policy
> > *policy,
> >  	if (target_freq > policy->max)
> >  		target_freq = policy->max;
> >
> > -#ifdef CONFIG_ARCH_OMAP1
> >  	freqs.old = omap_getspeed(0);
> >  	freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) /
> 1000;
> >  	freqs.cpu = 0;
> >
> >  	if (freqs.old == freqs.new)
> >  		return ret;
> > +
> >  	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
> > +
> >  #ifdef CONFIG_CPU_FREQ_DEBUG
> > -	printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
> > -	       freqs.old, freqs.new);
> > +	pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old,
> > freqs.new);
> >  #endif
> > +
> >  	ret = clk_set_rate(mpu_clk, freqs.new * 1000);
> > +	if (ret)
> > +		return ret;
> Do you want to return here w/o calling post notifiers and
> readjusting the
> jiffies? Cpufreq updates lpj as part of PRECHANGE notifier when
> frequency
> is scaled up. So in that case returning here will end of having
> wrong lpj I suppose.
You are right. A notifier with old freq is needed here.

Regards,
Santosh
--
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