+++ /dev/null
-From: Thara Gopinath <thara@ti.com>
-Date: Wed, 7 Oct 2009 00:59:43 +0000 (-0500)
-Subject: OMAP3: PM: Voltage Scaling fixes
-X-Git-Tag: android-2.6.29-1.6-13~23
-X-Git-Url: http://git.omapzoom.org/?p=kernel%2Fomap.git;a=commitdiff_plain;h=4243e3ab5eb2ff8cccb022387e49a2bcd9c6175e
-
-OMAP3: PM: Voltage Scaling fixes
-
-This patch does the following:
-
-* Update VC_CMD_VAL0 and VC_CMD_VAL1 registers during voltage
- scaling using vp force update. Without this VDD1 and VDD2
- voltages will not be restored back to the proper values once
- ret/off is hit.
-* Enable VP force update method of voltage scaling by default.
-
-Signed-off-by: Thara Gopinath <thara@ti.com>
-Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
----
-
-Index: kernel-2.6.28/arch/arm/mach-omap2/pm34xx.c
-===================================================================
---- kernel-2.6.28.orig/arch/arm/mach-omap2/pm34xx.c
-+++ kernel-2.6.28/arch/arm/mach-omap2/pm34xx.c
-@@ -1323,20 +1323,28 @@ static int voltagescale_vpforceupdate(u3
- current_opp_no = get_opp_no(current_opp);
- t2_smps_steps = abs(target_vsel - current_vsel);
-
-- if (vdd == VDD1_OPP) {
-+ if (vdd == PRCM_VDD1) {
- vp_config_offs = OMAP3_PRM_VP1_CONFIG_OFFSET;
- vp_tranxdone_st = OMAP3430_VP1_TRANXDONE_ST;
- vpconfig = target_vsel << OMAP3430_INITVOLTAGE_SHIFT |
- ((target_opp_no < VDD1_OPP3)
-- ? PRM_VP1_CONFIG_ERRORGAIN_OPPLOW
-- : PRM_VP1_CONFIG_ERRORGAIN_OPPHIGH);
-- } else if (vdd == VDD2_OPP) {
-+ ? PRM_VP1_CONFIG_ERRORGAIN_LOWOPP
-+ : PRM_VP1_CONFIG_ERRORGAIN_HIGHOPP);
-+ prm_rmw_mod_reg_bits(OMAP3430_VC_CMD_ON_MASK,
-+ (target_vsel << OMAP3430_VC_CMD_ON_SHIFT),
-+ OMAP3430_GR_MOD,
-+ OMAP3_PRM_VC_CMD_VAL_0_OFFSET);
-+ } else if (vdd == PRCM_VDD2) {
- vp_config_offs = OMAP3_PRM_VP2_CONFIG_OFFSET;
- vp_tranxdone_st = OMAP3430_VP2_TRANXDONE_ST;
- vpconfig = target_vsel << OMAP3430_INITVOLTAGE_SHIFT |
- ((target_opp_no < VDD2_OPP3)
-- ? PRM_VP2_CONFIG_ERRORGAIN_OPPLOW
-- : PRM_VP2_CONFIG_ERRORGAIN_OPPHIGH);
-+ ? PRM_VP2_CONFIG_ERRORGAIN_LOWOPP
-+ : PRM_VP2_CONFIG_ERRORGAIN_HIGHOPP);
-+ prm_rmw_mod_reg_bits(OMAP3430_VC_CMD_ON_MASK,
-+ (target_vsel << OMAP3430_VC_CMD_ON_SHIFT),
-+ OMAP3430_GR_MOD,
-+ OMAP3_PRM_VC_CMD_VAL_1_OFFSET);
- }
- /* Clear all pending TransactionDone interrupt/status */
- while (timeout < VP_TRANXDONE_TIMEOUT) {