From e74e44054f8297d60fbd2ed1d412d84055afee8c Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Tue, 22 Mar 2011 14:12:37 -0700 Subject: OMAP2+: VC: support PMICs with separate voltage and command registers The VC layer can support PMICs with separate voltage and command registers by putting the different registers in the PRM_VC_SMPS_VOL_RA and PRCM_VC_SMPS_CMD_RA registers respectively. The PMIC data must supply at least a voltage register address (volt_reg_addr). The command register address (cmd_reg_addr) is optional. If the PMIC data does not supply a separate command register address, the VC will use the voltage register address for both. Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/vc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-omap2/vc.c') diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index b62363d9d2b7..1bdbe7c15612 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c @@ -115,7 +115,7 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm, vc_valid = vc->common->valid; vc_bypass_val_reg = vc->common->bypass_val_reg; vc_bypass_value = (target_vsel << vc->common->data_shift) | - (vdd->pmic_info->pmic_reg << + (vdd->pmic_info->volt_reg_addr << vc->common->regaddr_shift) | (vdd->pmic_info->i2c_slave_addr << vc->common->slaveaddr_shift); @@ -264,7 +264,7 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) vc_val = vdd->read_reg(vc->common->prm_mod, vc->common->smps_volra_reg); vc_val &= ~vc->smps_volra_mask; - vc_val |= vdd->pmic_info->pmic_reg << vc->smps_volra_shift; + vc_val |= vdd->pmic_info->volt_reg_addr << vc->smps_volra_shift; vdd->write_reg(vc_val, vc->common->prm_mod, vc->common->smps_volra_reg); -- cgit v1.2.3