aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/vc.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-29 17:24:47 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 15:02:56 -0400
commit78614e0f8f32dca52beebaadfb53c2a3acf1604a (patch)
tree8871d81112392cb3b49e22b2bfded6929bfbea1f /arch/arm/mach-omap2/vc.c
parente4e021c5491537783f5f65a6defa92e6098a3658 (diff)
OMAP3+: VC bypass: use fields from VC struct instead of PMIC info
The PMIC configurable variables should be isolated to VC initialization. The rest of the VC functions (like VC bypass) should use the i2c slave address and voltage register address fields from struct omap_vc_channel. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vc.c')
-rw-r--r--arch/arm/mach-omap2/vc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 22db6e6764d7..8f0105a7bb4b 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -100,7 +100,6 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
100 unsigned long target_volt) 100 unsigned long target_volt)
101{ 101{
102 struct omap_vc_channel *vc = voltdm->vc; 102 struct omap_vc_channel *vc = voltdm->vc;
103 struct omap_vdd_info *vdd = voltdm->vdd;
104 u32 loop_cnt = 0, retries_cnt = 0; 103 u32 loop_cnt = 0, retries_cnt = 0;
105 u32 vc_valid, vc_bypass_val_reg, vc_bypass_value; 104 u32 vc_valid, vc_bypass_val_reg, vc_bypass_value;
106 u8 target_vsel, current_vsel; 105 u8 target_vsel, current_vsel;
@@ -113,10 +112,8 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
113 vc_valid = vc->common->valid; 112 vc_valid = vc->common->valid;
114 vc_bypass_val_reg = vc->common->bypass_val_reg; 113 vc_bypass_val_reg = vc->common->bypass_val_reg;
115 vc_bypass_value = (target_vsel << vc->common->data_shift) | 114 vc_bypass_value = (target_vsel << vc->common->data_shift) |
116 (vdd->pmic_info->volt_reg_addr << 115 (vc->volt_reg_addr << vc->common->regaddr_shift) |
117 vc->common->regaddr_shift) | 116 (vc->i2c_slave_addr << vc->common->slaveaddr_shift);
118 (vdd->pmic_info->i2c_slave_addr <<
119 vc->common->slaveaddr_shift);
120 117
121 voltdm->write(vc_bypass_value, vc_bypass_val_reg); 118 voltdm->write(vc_bypass_value, vc_bypass_val_reg);
122 voltdm->write(vc_bypass_value | vc_valid, vc_bypass_val_reg); 119 voltdm->write(vc_bypass_value | vc_valid, vc_bypass_val_reg);