diff options
author | Nishanth Menon <nm@ti.com> | 2011-06-06 12:34:44 -0700 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-06-13 16:44:17 -0500 |
commit | 4bbec562ac0291dd741562c4eef83934c7850047 (patch) | |
tree | c95f566e7442a03c4d22e8593be413536c9e2690 /arch/arm/mach-omap2/vc.c | |
parent | 17699b0b15dd134d29a1a7bfc0cca3996c33b7b5 (diff) | |
download | kernel_samsung_tuna-4bbec562ac0291dd741562c4eef83934c7850047.zip kernel_samsung_tuna-4bbec562ac0291dd741562c4eef83934c7850047.tar.gz kernel_samsung_tuna-4bbec562ac0291dd741562c4eef83934c7850047.tar.bz2 |
OMAP4: PM: VC: allow channels use of default channel volt_reg_addr
OMAP4's PRM_VC_CFG_CHANNEL register allows for flexibility of configuring
for various PMIC configurations. In combinations where we'd like to
use the default VC channel's voltage_reg address in a particular non-default
VC channel, we allow the use of USE_DEFAULT_CHANNEL_I2C_PARAM.
Since 0 is a valid register address, we need to increase the size of
reg storage for the flag. Depending on the PMIC and platform used,
this can be populated on the PMIC's datastructure and percolates to
VC's configuration.
Signed-off-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vc.c')
-rw-r--r-- | arch/arm/mach-omap2/vc.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 6017c70..53a16cc 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c @@ -310,10 +310,11 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) vc->setup_time = voltdm->pmic->volt_setup_time; if ((vc->flags & OMAP_VC_CHANNEL_DEFAULT) && - (vc->i2c_slave_addr == USE_DEFAULT_CHANNEL_I2C_PARAM)) { + ((vc->i2c_slave_addr == USE_DEFAULT_CHANNEL_I2C_PARAM) || + (vc->volt_reg_addr == USE_DEFAULT_CHANNEL_I2C_PARAM))) { pr_err("%s: voltdm %s: default channel " - "bad config-sa=%2x ?\n", __func__, voltdm->name, - vc->i2c_slave_addr); + "bad config-sa=%2x vol=%2x?\n", __func__, voltdm->name, + vc->i2c_slave_addr, vc->volt_reg_addr); return; } @@ -328,10 +329,12 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) /* * Configure the PMIC register addresses. */ - voltdm->rmw(vc->smps_volra_mask, - vc->volt_reg_addr << __ffs(vc->smps_volra_mask), - vc->common->smps_volra_reg); - vc->cfg_channel |= vc_cfg_bits->rav; + if (vc->volt_reg_addr != USE_DEFAULT_CHANNEL_I2C_PARAM) { + voltdm->rmw(vc->smps_volra_mask, + vc->volt_reg_addr << __ffs(vc->smps_volra_mask), + vc->common->smps_volra_reg); + vc->cfg_channel |= vc_cfg_bits->rav; + } if (vc->cmd_reg_addr) { voltdm->rmw(vc->smps_cmdra_mask, |