davinci: cpufreq: bailout on regulator errors
authorSekhar Nori <nsekhar@ti.com>
Tue, 20 Jul 2010 11:16:48 +0000 (16:46 +0530)
committerKevin Hilman <khilman@deeprootsystems.com>
Fri, 24 Sep 2010 14:40:23 +0000 (07:40 -0700)
commitfca97b3337edb6b12707d167460b224dd8ef6052
tree135f93d4c852af28cd767d1b015be2b712cda7a6
parentc89f1681450822c74afb3217ed4c24a177a23f43
davinci: cpufreq: bailout on regulator errors

Current cpufreq code does not consider errors that can occur while
changing voltage. Code to increase CPU  frequency goes ahead even in
the case the regulator has failed to increase the voltage. This leads
to hard error since lower voltages cannot support increased frequency.

Prevent this by not increasing frequency in case increasing voltage
is not successful.

Also, do not lower the voltage if changing the cpu frequency has failed
for some reason.

Note that we do not return error on failure to decrease voltage as
that is not a hard error.

Build fix for non-cpufreq kernels by Caglar Akyuz.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Cc: Caglar Akyuz <caglar@bilkon-kontrol.com.tr>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/cpufreq.c
arch/arm/mach-davinci/da850.c