]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - sitara-epos/sitara-epos-kernel.git/commit
cpufreq: OMAP: notify even with bad boot frequency
authorColin Cross <ccross@google.com>
Wed, 7 Dec 2011 20:08:35 +0000 (12:08 -0800)
committerTony Lindgren <tony@atomide.com>
Wed, 7 Dec 2011 20:08:35 +0000 (12:08 -0800)
commit7768c2d7b024a794a028510f388f6a500b618ea3
tree3e69c23398e767b8ee008ecc2d3e671dad4abe6c
parent1ce8ddd10f2f6e6cddb7cb5282c4d2c76b99d2ff
cpufreq: OMAP: notify even with bad boot frequency

Sometimes, bootloaders starts up with a frequency which is not
in the OPP table. At cpu_init, policy->cur contains the frequency
we pick at boot.  It is possible that system might have fixed
it's boot frequency later on as part of power initialization.
After this condition, the first call to omap_target results in the
following:

omap_getspeed(actual device frequency) != policy->cur(frequency that
cpufreq thinks that the system is at), and it is possible that
freqs.old == freqs.new (because the governor requested a scale down).

We exit without triggering the notifiers in the current code, which
does'nt let code which depends on cpufreq_notify_transition to have
accurate information as to what the system frequency is.

Instead, we do a normal transition if policy->cur is wrong, then,
freqs.old will be the actual cpu frequency, freqs.new will be the
actual new cpu frequency and all required notifiers have the accurate
information.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Colin Cross <ccross@google.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
drivers/cpufreq/omap-cpufreq.c