]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: OMAP: ensure valid clock rate before scaling
authorKevin Hilman <khilman@ti.com>
Tue, 2 Oct 2012 22:39:03 +0000 (15:39 -0700)
committerKevin Hilman <khilman@ti.com>
Mon, 8 Oct 2012 21:57:34 +0000 (14:57 -0700)
commit0d22d2fff753464e749b1d4b39f36b2041c51a77
tree78b455c21370f4625a5b6c75cede4404413973b3
parent99d5e1f6f1b54545db81175f9d97e4fb342bdc2e
cpufreq: OMAP: ensure valid clock rate before scaling

Ensure the clock rate that will be used is a valid one before
attempting to scale the voltage.  Currently the driver assumes it has
a valid frequency from the OPP table, but boards using different
system oscillators might not have exact matches with the OPP table,
and result in a failing call to clk_set_rate().

This is particularily bad because the voltage may be scaled even
though the frequency is not.  This will obviously lead to some
unpredictable behavior, especially if the frequency is high and
the voltage is dropped.

Thanks to Joni Lapilainen for reporting crashes seen on 3430/n900.

Reported-by: Joni Lapilainen <joni.lapilainen@gmail.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Kevin Hilman <khilman@ti.com>
drivers/cpufreq/omap-cpufreq.c