omap3: Fix voltage and frequency scaling order when changing OPP via mpurate psp/master
authorRanjith Lohithakshan <ranjithl@ti.com>
Fri, 28 May 2010 09:50:32 +0000 (15:20 +0530)
committerRanjith Lohithakshan <ranjithl@ti.com>
Fri, 28 May 2010 09:50:32 +0000 (15:20 +0530)
commitd247a112a9ffbad1057a2c8bede5727940ac2045
tree12eb5cbeed22d09f0f3f6b4a43a3cf1771224c9f
parent908b7949544571e9acc1fe0cce918f6e338926c9
omap3: Fix voltage and frequency scaling order when changing OPP via mpurate

When lowering an OPP via mpurate from what is being set by bootloader,
the frequency need to be lowered before voltage is ramped down. The
current code was not taking this into consideration and was always
adjusting the voltage before the frequency adjustments.

This was leading to crashes on 3730 when mpurate was set to 300MHz
because the voltage was lowered before the frequency.

This patch fixes these issues by tracking the direction of OPP change
and doing the voltage and frequency change in the right order.

Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
arch/arm/mach-omap2/clock34xx.c
arch/arm/mach-omap2/smartreflex.c