diff options
author | Kevin Hilman <khilman@ti.com> | 2011-03-23 00:12:37 +0300 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 22:39:11 +0400 |
commit | e74e44054f8297d60fbd2ed1d412d84055afee8c (patch) | |
tree | 2bbfb22023db5153b809653f73bbd0a08ab5ad92 /arch/arm/mach-omap2/vc.c | |
parent | 01f48d308db1cfcfb0151d8d91153fd73e84ae40 (diff) | |
download | linux-e74e44054f8297d60fbd2ed1d412d84055afee8c.tar.xz |
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 <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vc.c')
-rw-r--r-- | arch/arm/mach-omap2/vc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |