}
*target_vsel = voltdm->pmic->uv_to_vsel(target_volt);
- *current_vsel = voltdm->pmic->uv_to_vsel(vdd->curr_volt);
+ *current_vsel = voltdm->pmic->uv_to_vsel(voltdm->nominal_volt);
/* Setting the ON voltage to the new target voltage */
vc_cmdval = voltdm->read(vc->cmdval_reg);
unsigned long target_volt,
u8 target_vsel, u8 current_vsel)
{
- struct omap_vdd_info *vdd = voltdm->vdd;
u32 smps_steps = 0, smps_delay = 0;
smps_steps = abs(target_vsel - current_vsel);
voltdm->pmic->slew_rate) + 2;
udelay(smps_delay);
- vdd->curr_volt = target_volt;
+ voltdm->nominal_volt = target_volt;
}
/* vc_bypass_scale - VC bypass method of voltage scaling */
*/
unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm)
{
- struct omap_vdd_info *vdd;
-
if (!voltdm || IS_ERR(voltdm)) {
pr_warning("%s: VDD specified does not exist!\n", __func__);
return 0;
}
- vdd = voltdm->vdd;
-
- return vdd->curr_volt;
+ return voltdm->nominal_volt;
}
/**
* @sys_clk: system clock name/frequency, used for various timing calculations
* @vdd: to be removed
* @scale: function used to scale the voltage of the voltagedomain
+ * @nominal_volt: current nominal voltage for this voltage domain
*/
struct voltagedomain {
char *name;
int (*scale) (struct voltagedomain *voltdm,
unsigned long target_volt);
+ u32 nominal_volt;
struct omap_vdd_info *vdd;
};
*
* @volt_data : voltage table having the distinct voltages supported
* by the domain and other associated per voltage data.
- * @curr_volt : current voltage for this vdd.
*/
struct omap_vdd_info {
struct omap_volt_data *volt_data;
- u32 curr_volt;
};
void omap_voltage_get_volttable(struct voltagedomain *voltdm,