aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-30 14:01:10 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 15:08:57 -0400
commitce8ebe0dfb1f8713337cebf82499d3dced288328 (patch)
tree3ffb4cac949459b9feda4f307d4d9b51b0da3a5c /arch
parent24d3194a2c9bc4d2315117915d4d22c395c07fd5 (diff)
OMAP3+: voltage domain: move PMIC struct from vdd_info into struct voltagedomain
Move structure containing PMIC configurable settings into struct voltagedomain. In the process, rename from omap_volt_pmic_info to omap_voltdm_pmic (_info suffix is not helpful.) No functional changes. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap_twl.c28
-rw-r--r--arch/arm/mach-omap2/vc.c29
-rw-r--r--arch/arm/mach-omap2/vc.h4
-rw-r--r--arch/arm/mach-omap2/voltage.c29
-rw-r--r--arch/arm/mach-omap2/voltage.h12
-rw-r--r--arch/arm/mach-omap2/vp.c13
6 files changed, 55 insertions, 60 deletions
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 3249fe3c3c1d..e467d4565a2d 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -143,7 +143,7 @@ static u8 twl6030_uv_to_vsel(unsigned long uv)
143 return DIV_ROUND_UP(uv - 600000, 12500) + 1; 143 return DIV_ROUND_UP(uv - 600000, 12500) + 1;
144} 144}
145 145
146static struct omap_volt_pmic_info omap3_mpu_volt_info = { 146static struct omap_voltdm_pmic omap3_mpu_pmic = {
147 .slew_rate = 4000, 147 .slew_rate = 4000,
148 .step_size = 12500, 148 .step_size = 12500,
149 .on_volt = 1200000, 149 .on_volt = 1200000,
@@ -163,7 +163,7 @@ static struct omap_volt_pmic_info omap3_mpu_volt_info = {
163 .uv_to_vsel = twl4030_uv_to_vsel, 163 .uv_to_vsel = twl4030_uv_to_vsel,
164}; 164};
165 165
166static struct omap_volt_pmic_info omap3_core_volt_info = { 166static struct omap_voltdm_pmic omap3_core_pmic = {
167 .slew_rate = 4000, 167 .slew_rate = 4000,
168 .step_size = 12500, 168 .step_size = 12500,
169 .on_volt = 1200000, 169 .on_volt = 1200000,
@@ -183,7 +183,7 @@ static struct omap_volt_pmic_info omap3_core_volt_info = {
183 .uv_to_vsel = twl4030_uv_to_vsel, 183 .uv_to_vsel = twl4030_uv_to_vsel,
184}; 184};
185 185
186static struct omap_volt_pmic_info omap4_mpu_volt_info = { 186static struct omap_voltdm_pmic omap4_mpu_pmic = {
187 .slew_rate = 4000, 187 .slew_rate = 4000,
188 .step_size = 12500, 188 .step_size = 12500,
189 .on_volt = 1350000, 189 .on_volt = 1350000,
@@ -203,7 +203,7 @@ static struct omap_volt_pmic_info omap4_mpu_volt_info = {
203 .uv_to_vsel = twl6030_uv_to_vsel, 203 .uv_to_vsel = twl6030_uv_to_vsel,
204}; 204};
205 205
206static struct omap_volt_pmic_info omap4_iva_volt_info = { 206static struct omap_voltdm_pmic omap4_iva_pmic = {
207 .slew_rate = 4000, 207 .slew_rate = 4000,
208 .step_size = 12500, 208 .step_size = 12500,
209 .on_volt = 1100000, 209 .on_volt = 1100000,
@@ -223,7 +223,7 @@ static struct omap_volt_pmic_info omap4_iva_volt_info = {
223 .uv_to_vsel = twl6030_uv_to_vsel, 223 .uv_to_vsel = twl6030_uv_to_vsel,
224}; 224};
225 225
226static struct omap_volt_pmic_info omap4_core_volt_info = { 226static struct omap_voltdm_pmic omap4_core_pmic = {
227 .slew_rate = 4000, 227 .slew_rate = 4000,
228 .step_size = 12500, 228 .step_size = 12500,
229 .on_volt = 1100000, 229 .on_volt = 1100000,
@@ -251,13 +251,13 @@ int __init omap4_twl_init(void)
251 return -ENODEV; 251 return -ENODEV;
252 252
253 voltdm = voltdm_lookup("mpu"); 253 voltdm = voltdm_lookup("mpu");
254 omap_voltage_register_pmic(voltdm, &omap4_mpu_volt_info); 254 omap_voltage_register_pmic(voltdm, &omap4_mpu_pmic);
255 255
256 voltdm = voltdm_lookup("iva"); 256 voltdm = voltdm_lookup("iva");
257 omap_voltage_register_pmic(voltdm, &omap4_iva_volt_info); 257 omap_voltage_register_pmic(voltdm, &omap4_iva_pmic);
258 258
259 voltdm = voltdm_lookup("core"); 259 voltdm = voltdm_lookup("core");
260 omap_voltage_register_pmic(voltdm, &omap4_core_volt_info); 260 omap_voltage_register_pmic(voltdm, &omap4_core_pmic);
261 261
262 return 0; 262 return 0;
263} 263}
@@ -270,10 +270,10 @@ int __init omap3_twl_init(void)
270 return -ENODEV; 270 return -ENODEV;
271 271
272 if (cpu_is_omap3630()) { 272 if (cpu_is_omap3630()) {
273 omap3_mpu_volt_info.vp_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN; 273 omap3_mpu_pmic.vp_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN;
274 omap3_mpu_volt_info.vp_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX; 274 omap3_mpu_pmic.vp_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX;
275 omap3_core_volt_info.vp_vddmin = OMAP3630_VP2_VLIMITTO_VDDMIN; 275 omap3_core_pmic.vp_vddmin = OMAP3630_VP2_VLIMITTO_VDDMIN;
276 omap3_core_volt_info.vp_vddmax = OMAP3630_VP2_VLIMITTO_VDDMAX; 276 omap3_core_pmic.vp_vddmax = OMAP3630_VP2_VLIMITTO_VDDMAX;
277 } 277 }
278 278
279 /* 279 /*
@@ -289,10 +289,10 @@ int __init omap3_twl_init(void)
289 omap3_twl_set_sr_bit(true); 289 omap3_twl_set_sr_bit(true);
290 290
291 voltdm = voltdm_lookup("mpu_iva"); 291 voltdm = voltdm_lookup("mpu_iva");
292 omap_voltage_register_pmic(voltdm, &omap3_mpu_volt_info); 292 omap_voltage_register_pmic(voltdm, &omap3_mpu_pmic);
293 293
294 voltdm = voltdm_lookup("core"); 294 voltdm = voltdm_lookup("core");
295 omap_voltage_register_pmic(voltdm, &omap3_core_volt_info); 295 omap_voltage_register_pmic(voltdm, &omap3_core_pmic);
296 296
297 return 0; 297 return 0;
298} 298}
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 1791f79112bf..4ac761440d62 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -79,13 +79,13 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm,
79 vp_common = vdd->vp_data->vp_common; 79 vp_common = vdd->vp_data->vp_common;
80 80
81 /* Check if sufficient pmic info is available for this vdd */ 81 /* Check if sufficient pmic info is available for this vdd */
82 if (!vdd->pmic_info) { 82 if (!voltdm->pmic) {
83 pr_err("%s: Insufficient pmic info to scale the vdd_%s\n", 83 pr_err("%s: Insufficient pmic info to scale the vdd_%s\n",
84 __func__, voltdm->name); 84 __func__, voltdm->name);
85 return -EINVAL; 85 return -EINVAL;
86 } 86 }
87 87
88 if (!vdd->pmic_info->uv_to_vsel) { 88 if (!voltdm->pmic->uv_to_vsel) {
89 pr_err("%s: PMIC function to convert voltage in uV to" 89 pr_err("%s: PMIC function to convert voltage in uV to"
90 "vsel not registered. Hence unable to scale voltage" 90 "vsel not registered. Hence unable to scale voltage"
91 "for vdd_%s\n", __func__, voltdm->name); 91 "for vdd_%s\n", __func__, voltdm->name);
@@ -103,7 +103,7 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm,
103 if (IS_ERR(volt_data)) 103 if (IS_ERR(volt_data))
104 volt_data = NULL; 104 volt_data = NULL;
105 105
106 *target_vsel = vdd->pmic_info->uv_to_vsel(target_volt); 106 *target_vsel = voltdm->pmic->uv_to_vsel(target_volt);
107 *current_vsel = voltdm->read(vdd->vp_data->voltage); 107 *current_vsel = voltdm->read(vdd->vp_data->voltage);
108 108
109 /* Setting the ON voltage to the new target voltage */ 109 /* Setting the ON voltage to the new target voltage */
@@ -134,8 +134,8 @@ void omap_vc_post_scale(struct voltagedomain *voltdm,
134 134
135 smps_steps = abs(target_vsel - current_vsel); 135 smps_steps = abs(target_vsel - current_vsel);
136 /* SMPS slew rate / step size. 2us added as buffer. */ 136 /* SMPS slew rate / step size. 2us added as buffer. */
137 smps_delay = ((smps_steps * vdd->pmic_info->step_size) / 137 smps_delay = ((smps_steps * voltdm->pmic->step_size) /
138 vdd->pmic_info->slew_rate) + 2; 138 voltdm->pmic->slew_rate) + 2;
139 udelay(smps_delay); 139 udelay(smps_delay);
140 140
141 vdd->curr_volt = target_volt; 141 vdd->curr_volt = target_volt;
@@ -240,11 +240,10 @@ static void __init omap4_vc_init_channel(struct voltagedomain *voltdm)
240void __init omap_vc_init_channel(struct voltagedomain *voltdm) 240void __init omap_vc_init_channel(struct voltagedomain *voltdm)
241{ 241{
242 struct omap_vc_channel *vc = voltdm->vc; 242 struct omap_vc_channel *vc = voltdm->vc;
243 struct omap_vdd_info *vdd = voltdm->vdd;
244 u8 on_vsel, onlp_vsel, ret_vsel, off_vsel; 243 u8 on_vsel, onlp_vsel, ret_vsel, off_vsel;
245 u32 val; 244 u32 val;
246 245
247 if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { 246 if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
248 pr_err("%s: PMIC info requried to configure vc for" 247 pr_err("%s: PMIC info requried to configure vc for"
249 "vdd_%s not populated.Hence cannot initialize vc\n", 248 "vdd_%s not populated.Hence cannot initialize vc\n",
250 __func__, voltdm->name); 249 __func__, voltdm->name);
@@ -260,10 +259,10 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm)
260 vc->cfg_channel = 0; 259 vc->cfg_channel = 0;
261 260
262 /* get PMIC/board specific settings */ 261 /* get PMIC/board specific settings */
263 vc->i2c_slave_addr = vdd->pmic_info->i2c_slave_addr; 262 vc->i2c_slave_addr = voltdm->pmic->i2c_slave_addr;
264 vc->volt_reg_addr = vdd->pmic_info->volt_reg_addr; 263 vc->volt_reg_addr = voltdm->pmic->volt_reg_addr;
265 vc->cmd_reg_addr = vdd->pmic_info->cmd_reg_addr; 264 vc->cmd_reg_addr = voltdm->pmic->cmd_reg_addr;
266 vc->setup_time = vdd->pmic_info->volt_setup_time; 265 vc->setup_time = voltdm->pmic->volt_setup_time;
267 266
268 /* Configure the i2c slave address for this VC */ 267 /* Configure the i2c slave address for this VC */
269 voltdm->rmw(vc->smps_sa_mask, 268 voltdm->rmw(vc->smps_sa_mask,
@@ -287,10 +286,10 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm)
287 } 286 }
288 287
289 /* Set up the on, inactive, retention and off voltage */ 288 /* Set up the on, inactive, retention and off voltage */
290 on_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->on_volt); 289 on_vsel = voltdm->pmic->uv_to_vsel(voltdm->pmic->on_volt);
291 onlp_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->onlp_volt); 290 onlp_vsel = voltdm->pmic->uv_to_vsel(voltdm->pmic->onlp_volt);
292 ret_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->ret_volt); 291 ret_vsel = voltdm->pmic->uv_to_vsel(voltdm->pmic->ret_volt);
293 off_vsel = vdd->pmic_info->uv_to_vsel(vdd->pmic_info->off_volt); 292 off_vsel = voltdm->pmic->uv_to_vsel(voltdm->pmic->off_volt);
294 val = ((on_vsel << vc->common->cmd_on_shift) | 293 val = ((on_vsel << vc->common->cmd_on_shift) |
295 (onlp_vsel << vc->common->cmd_onlp_shift) | 294 (onlp_vsel << vc->common->cmd_onlp_shift) |
296 (ret_vsel << vc->common->cmd_ret_shift) | 295 (ret_vsel << vc->common->cmd_ret_shift) |
diff --git a/arch/arm/mach-omap2/vc.h b/arch/arm/mach-omap2/vc.h
index 4e1913748d2a..fd385285a3bf 100644
--- a/arch/arm/mach-omap2/vc.h
+++ b/arch/arm/mach-omap2/vc.h
@@ -36,6 +36,7 @@ struct voltagedomain;
36 * @cmd_onlp_shift: ONLP field shift in PRM_VC_CMD_VAL_* register 36 * @cmd_onlp_shift: ONLP field shift in PRM_VC_CMD_VAL_* register
37 * @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register 37 * @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register
38 * @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register 38 * @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register
39 * @cfg_channel_reg: VC channel configuration register
39 * 40 *
40 * XXX One of cmd_on_mask and cmd_on_shift are not needed 41 * XXX One of cmd_on_mask and cmd_on_shift are not needed
41 * XXX VALID should probably be a shift, not a mask 42 * XXX VALID should probably be a shift, not a mask
@@ -66,11 +67,14 @@ struct omap_vc_common {
66 * @volt_reg_addr: voltage configuration register address 67 * @volt_reg_addr: voltage configuration register address
67 * @cmd_reg_addr: command configuration register address 68 * @cmd_reg_addr: command configuration register address
68 * @setup_time: setup time (in sys_clk cycles) of regulator for this channel 69 * @setup_time: setup time (in sys_clk cycles) of regulator for this channel
70 * @cfg_channel: current value of VC channel configuration register
71 *
69 * @common: pointer to VC common data for this platform 72 * @common: pointer to VC common data for this platform
70 * @smps_sa_mask: i2c slave address bitmask in the PRM_VC_SMPS_SA register 73 * @smps_sa_mask: i2c slave address bitmask in the PRM_VC_SMPS_SA register
71 * @smps_volra_mask: VOLRA* bitmask in the PRM_VC_VOL_RA register 74 * @smps_volra_mask: VOLRA* bitmask in the PRM_VC_VOL_RA register
72 * @smps_cmdra_mask: CMDRA* bitmask in the PRM_VC_CMD_RA register 75 * @smps_cmdra_mask: CMDRA* bitmask in the PRM_VC_CMD_RA register
73 * @cmdval_reg: register for on/ret/off voltage level values for this channel 76 * @cmdval_reg: register for on/ret/off voltage level values for this channel
77 * @cfg_channel_sa_shift: bit shift for slave address cfg_channel register
74 * @flags: VC channel-specific flags (optional) 78 * @flags: VC channel-specific flags (optional)
75 */ 79 */
76struct omap_vc_channel { 80struct omap_vc_channel {
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 9f9f01465f6a..94f7fc41c27c 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -84,20 +84,20 @@ static int __init _config_common_vdd_data(struct voltagedomain *voltdm)
84 vdd->vp_enabled = false; 84 vdd->vp_enabled = false;
85 85
86 vdd->vp_rt_data.vpconfig_erroroffset = 86 vdd->vp_rt_data.vpconfig_erroroffset =
87 (vdd->pmic_info->vp_erroroffset << 87 (voltdm->pmic->vp_erroroffset <<
88 vdd->vp_data->vp_common->vpconfig_erroroffset_shift); 88 vdd->vp_data->vp_common->vpconfig_erroroffset_shift);
89 89
90 timeout_val = (sys_clk_speed * vdd->pmic_info->vp_timeout_us) / 1000; 90 timeout_val = (sys_clk_speed * voltdm->pmic->vp_timeout_us) / 1000;
91 vdd->vp_rt_data.vlimitto_timeout = timeout_val; 91 vdd->vp_rt_data.vlimitto_timeout = timeout_val;
92 vdd->vp_rt_data.vlimitto_vddmin = vdd->pmic_info->vp_vddmin; 92 vdd->vp_rt_data.vlimitto_vddmin = voltdm->pmic->vp_vddmin;
93 vdd->vp_rt_data.vlimitto_vddmax = vdd->pmic_info->vp_vddmax; 93 vdd->vp_rt_data.vlimitto_vddmax = voltdm->pmic->vp_vddmax;
94 94
95 waittime = ((vdd->pmic_info->step_size / vdd->pmic_info->slew_rate) * 95 waittime = ((voltdm->pmic->step_size / voltdm->pmic->slew_rate) *
96 sys_clk_speed) / 1000; 96 sys_clk_speed) / 1000;
97 vdd->vp_rt_data.vstepmin_smpswaittimemin = waittime; 97 vdd->vp_rt_data.vstepmin_smpswaittimemin = waittime;
98 vdd->vp_rt_data.vstepmax_smpswaittimemax = waittime; 98 vdd->vp_rt_data.vstepmax_smpswaittimemax = waittime;
99 vdd->vp_rt_data.vstepmin_stepmin = vdd->pmic_info->vp_vstepmin; 99 vdd->vp_rt_data.vstepmin_stepmin = voltdm->pmic->vp_vstepmin;
100 vdd->vp_rt_data.vstepmax_stepmax = vdd->pmic_info->vp_vstepmax; 100 vdd->vp_rt_data.vstepmax_stepmax = voltdm->pmic->vp_vstepmax;
101 101
102 return 0; 102 return 0;
103} 103}
@@ -149,10 +149,9 @@ static void __init vdd_debugfs_init(struct voltagedomain *voltdm)
149 149
150static int __init omap_vdd_data_configure(struct voltagedomain *voltdm) 150static int __init omap_vdd_data_configure(struct voltagedomain *voltdm)
151{ 151{
152 struct omap_vdd_info *vdd = voltdm->vdd;
153 int ret = -EINVAL; 152 int ret = -EINVAL;
154 153
155 if (!vdd->pmic_info) { 154 if (!voltdm->pmic) {
156 pr_err("%s: PMIC info requried to configure vdd_%s not" 155 pr_err("%s: PMIC info requried to configure vdd_%s not"
157 "populated.Hence cannot initialize vdd_%s\n", 156 "populated.Hence cannot initialize vdd_%s\n",
158 __func__, voltdm->name, voltdm->name); 157 __func__, voltdm->name, voltdm->name);
@@ -324,24 +323,20 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
324 * omap_voltage_register_pmic() - API to register PMIC specific data 323 * omap_voltage_register_pmic() - API to register PMIC specific data
325 * @voltdm: pointer to the VDD for which the PMIC specific data is 324 * @voltdm: pointer to the VDD for which the PMIC specific data is
326 * to be registered 325 * to be registered
327 * @pmic_info: the structure containing pmic info 326 * @pmic: the structure containing pmic info
328 * 327 *
329 * This API is to be called by the SOC/PMIC file to specify the 328 * This API is to be called by the SOC/PMIC file to specify the
330 * pmic specific info as present in omap_volt_pmic_info structure. 329 * pmic specific info as present in omap_voltdm_pmic structure.
331 */ 330 */
332int omap_voltage_register_pmic(struct voltagedomain *voltdm, 331int omap_voltage_register_pmic(struct voltagedomain *voltdm,
333 struct omap_volt_pmic_info *pmic_info) 332 struct omap_voltdm_pmic *pmic)
334{ 333{
335 struct omap_vdd_info *vdd;
336
337 if (!voltdm || IS_ERR(voltdm)) { 334 if (!voltdm || IS_ERR(voltdm)) {
338 pr_warning("%s: VDD specified does not exist!\n", __func__); 335 pr_warning("%s: VDD specified does not exist!\n", __func__);
339 return -EINVAL; 336 return -EINVAL;
340 } 337 }
341 338
342 vdd = voltdm->vdd; 339 voltdm->pmic = pmic;
343
344 vdd->pmic_info = pmic_info;
345 340
346 return 0; 341 return 0;
347} 342}
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index 99df2d13e42e..43ee7bf57969 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -67,6 +67,7 @@ struct voltagedomain {
67 struct list_head pwrdm_list; 67 struct list_head pwrdm_list;
68 struct omap_vc_channel *vc; 68 struct omap_vc_channel *vc;
69 const struct omap_vfsm_instance *vfsm; 69 const struct omap_vfsm_instance *vfsm;
70 struct omap_voltdm_pmic *pmic;
70 71
71 /* VC/VP register access functions: SoC specific */ 72 /* VC/VP register access functions: SoC specific */
72 u32 (*read) (u8 offset); 73 u32 (*read) (u8 offset);
@@ -96,7 +97,7 @@ struct omap_volt_data {
96}; 97};
97 98
98/** 99/**
99 * struct omap_volt_pmic_info - PMIC specific data required by voltage driver. 100 * struct omap_voltdm_pmic - PMIC specific data required by voltage driver.
100 * @slew_rate: PMIC slew rate (in uv/us) 101 * @slew_rate: PMIC slew rate (in uv/us)
101 * @step_size: PMIC voltage step size (in uv) 102 * @step_size: PMIC voltage step size (in uv)
102 * @i2c_slave_addr: I2C slave address of PMIC 103 * @i2c_slave_addr: I2C slave address of PMIC
@@ -105,7 +106,7 @@ struct omap_volt_data {
105 * @vsel_to_uv: PMIC API to convert vsel value to actual voltage in uV. 106 * @vsel_to_uv: PMIC API to convert vsel value to actual voltage in uV.
106 * @uv_to_vsel: PMIC API to convert voltage in uV to vsel value. 107 * @uv_to_vsel: PMIC API to convert voltage in uV to vsel value.
107 */ 108 */
108struct omap_volt_pmic_info { 109struct omap_voltdm_pmic {
109 int slew_rate; 110 int slew_rate;
110 int step_size; 111 int step_size;
111 u32 on_volt; 112 u32 on_volt;
@@ -131,8 +132,6 @@ struct omap_volt_pmic_info {
131 * 132 *
132 * @volt_data : voltage table having the distinct voltages supported 133 * @volt_data : voltage table having the distinct voltages supported
133 * by the domain and other associated per voltage data. 134 * by the domain and other associated per voltage data.
134 * @pmic_info : pmic specific parameters which should be populted by
135 * the pmic drivers.
136 * @vp_data : the register values, shifts, masks for various 135 * @vp_data : the register values, shifts, masks for various
137 * vp registers 136 * vp registers
138 * @vp_rt_data : VP data derived at runtime, not predefined 137 * @vp_rt_data : VP data derived at runtime, not predefined
@@ -143,7 +142,6 @@ struct omap_volt_pmic_info {
143 */ 142 */
144struct omap_vdd_info { 143struct omap_vdd_info {
145 struct omap_volt_data *volt_data; 144 struct omap_volt_data *volt_data;
146 struct omap_volt_pmic_info *pmic_info;
147 struct omap_vp_instance_data *vp_data; 145 struct omap_vp_instance_data *vp_data;
148 struct omap_vp_runtime_data vp_rt_data; 146 struct omap_vp_runtime_data vp_rt_data;
149 struct dentry *debug_dir; 147 struct dentry *debug_dir;
@@ -165,13 +163,13 @@ unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm);
165struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm); 163struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm);
166#ifdef CONFIG_PM 164#ifdef CONFIG_PM
167int omap_voltage_register_pmic(struct voltagedomain *voltdm, 165int omap_voltage_register_pmic(struct voltagedomain *voltdm,
168 struct omap_volt_pmic_info *pmic_info); 166 struct omap_voltdm_pmic *pmic);
169void omap_change_voltscale_method(struct voltagedomain *voltdm, 167void omap_change_voltscale_method(struct voltagedomain *voltdm,
170 int voltscale_method); 168 int voltscale_method);
171int omap_voltage_late_init(void); 169int omap_voltage_late_init(void);
172#else 170#else
173static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, 171static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
174 struct omap_volt_pmic_info *pmic_info) 172 struct omap_voltdm_pmic *pmic)
175{ 173{
176 return -EINVAL; 174 return -EINVAL;
177} 175}
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 88ac742a38cf..a3afcbe741e3 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -18,7 +18,6 @@ static void vp_latch_vsel(struct voltagedomain *voltdm)
18 u32 vpconfig; 18 u32 vpconfig;
19 unsigned long uvdc; 19 unsigned long uvdc;
20 char vsel; 20 char vsel;
21 struct omap_vdd_info *vdd = voltdm->vdd;
22 21
23 uvdc = omap_voltage_get_nom_volt(voltdm); 22 uvdc = omap_voltage_get_nom_volt(voltdm);
24 if (!uvdc) { 23 if (!uvdc) {
@@ -27,13 +26,13 @@ static void vp_latch_vsel(struct voltagedomain *voltdm)
27 return; 26 return;
28 } 27 }
29 28
30 if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { 29 if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
31 pr_warning("%s: PMIC function to convert voltage in uV to" 30 pr_warning("%s: PMIC function to convert voltage in uV to"
32 " vsel not registered\n", __func__); 31 " vsel not registered\n", __func__);
33 return; 32 return;
34 } 33 }
35 34
36 vsel = vdd->pmic_info->uv_to_vsel(uvdc); 35 vsel = voltdm->pmic->uv_to_vsel(uvdc);
37 36
38 vpconfig = voltdm->read(vp->vpconfig); 37 vpconfig = voltdm->read(vp->vpconfig);
39 vpconfig &= ~(vp->vp_common->vpconfig_initvoltage_mask | 38 vpconfig &= ~(vp->vp_common->vpconfig_initvoltage_mask |
@@ -206,13 +205,13 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm)
206 205
207 curr_vsel = voltdm->read(vp->voltage); 206 curr_vsel = voltdm->read(vp->voltage);
208 207
209 if (!vdd->pmic_info || !vdd->pmic_info->vsel_to_uv) { 208 if (!voltdm->pmic || !voltdm->pmic->vsel_to_uv) {
210 pr_warning("%s: PMIC function to convert vsel to voltage" 209 pr_warning("%s: PMIC function to convert vsel to voltage"
211 "in uV not registerd\n", __func__); 210 "in uV not registerd\n", __func__);
212 return 0; 211 return 0;
213 } 212 }
214 213
215 return vdd->pmic_info->vsel_to_uv(curr_vsel); 214 return voltdm->pmic->vsel_to_uv(curr_vsel);
216} 215}
217 216
218/** 217/**
@@ -323,13 +322,13 @@ static int vp_volt_debug_get(void *data, u64 *val)
323 322
324 vsel = voltdm->read(vp->voltage); 323 vsel = voltdm->read(vp->voltage);
325 324
326 if (!vdd->pmic_info->vsel_to_uv) { 325 if (!voltdm->pmic->vsel_to_uv) {
327 pr_warning("PMIC function to convert vsel to voltage" 326 pr_warning("PMIC function to convert vsel to voltage"
328 "in uV not registerd\n"); 327 "in uV not registerd\n");
329 return -EINVAL; 328 return -EINVAL;
330 } 329 }
331 330
332 *val = vdd->pmic_info->vsel_to_uv(vsel); 331 *val = voltdm->pmic->vsel_to_uv(vsel);
333 return 0; 332 return 0;
334} 333}
335 334