Adding vpforce voltage scaling method patches
[kernel-bfs] / kernel-power-2.6.28 / debian / patches / voltage_scaling_0.diff
1 From: Thara Gopinath <thara@ti.com>
2 Date: Wed, 7 Oct 2009 00:59:43 +0000 (-0500)
3 Subject: OMAP3: PM: Voltage Scaling fixes
4 X-Git-Tag: android-2.6.29-1.6-13~23
5 X-Git-Url: http://git.omapzoom.org/?p=kernel%2Fomap.git;a=commitdiff_plain;h=4243e3ab5eb2ff8cccb022387e49a2bcd9c6175e
6
7 OMAP3: PM: Voltage Scaling fixes
8
9 This patch does the following:
10
11 * Update VC_CMD_VAL0 and VC_CMD_VAL1 registers during voltage
12   scaling using vp force update. Without this VDD1 and VDD2
13   voltages will not be restored back to the proper values once
14   ret/off is hit.
15 * Enable VP force update method of voltage scaling by default.
16
17 Signed-off-by: Thara Gopinath <thara@ti.com>
18 Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
19 ---
20
21 Index: kernel-2.6.28-patched/arch/arm/mach-omap2/pm34xx.c
22 ===================================================================
23 --- kernel-2.6.28-patched.orig/arch/arm/mach-omap2/pm34xx.c
24 +++ kernel-2.6.28-patched/arch/arm/mach-omap2/pm34xx.c
25 @@ -1330,6 +1330,10 @@ static int voltagescale_vpforceupdate(u3
26                                 ((target_opp_no < VDD1_OPP3)
27                                 ? PRM_VP1_CONFIG_ERRORGAIN_OPPLOW
28                                 : PRM_VP1_CONFIG_ERRORGAIN_OPPHIGH);
29 +               prm_rmw_mod_reg_bits(OMAP3430_VC_CMD_ON_MASK,
30 +                               (target_vsel << OMAP3430_VC_CMD_ON_SHIFT),
31 +                               OMAP3430_GR_MOD,
32 +                               OMAP3_PRM_VC_CMD_VAL_0_OFFSET);
33         } else if (vdd == VDD2_OPP) {
34                 vp_config_offs = OMAP3_PRM_VP2_CONFIG_OFFSET;
35                 vp_tranxdone_st = OMAP3430_VP2_TRANXDONE_ST;
36 @@ -1337,6 +1341,10 @@ static int voltagescale_vpforceupdate(u3
37                                 ((target_opp_no < VDD2_OPP3)
38                                 ? PRM_VP2_CONFIG_ERRORGAIN_OPPLOW
39                                 : PRM_VP2_CONFIG_ERRORGAIN_OPPHIGH);
40 +               prm_rmw_mod_reg_bits(OMAP3430_VC_CMD_ON_MASK,
41 +                               (target_vsel << OMAP3430_VC_CMD_ON_SHIFT),
42 +                               OMAP3430_GR_MOD,
43 +                               OMAP3_PRM_VC_CMD_VAL_1_OFFSET);
44         }
45         /* Clear all pending TransactionDone interrupt/status */
46         while (timeout < VP_TRANXDONE_TIMEOUT) {