summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/omap-common
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2016-08-17 16:25:35 +0530
committerTom Rini <trini@konsulko.com>2016-08-20 14:03:25 -0400
commit5328717cde60c81b355c456fa29ab22dad52a5db (patch)
tree7a444b7ddb496415267b5440746c70867b36af08 /arch/arm/cpu/armv7/omap-common
parent4ba58bdabd0ad8356401e5221e8377ebd412362d (diff)
ARM: OMAP5+: vcores: Drop unnecessary #ifndefs
gpio_en field is introduced to detect if pmic is controlled by GPIO. Make this field 0 on all TPS659* pmics available on DRA7/OMAP5 based platforms and remove the #ifndefs. Reviewed-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common')
-rw-r--r--arch/arm/cpu/armv7/omap-common/clocks-common.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c
index 2de99357657..7e5e752c3ef 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
@@ -443,15 +443,12 @@ void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic)
{
u32 offset_code;
u32 offset = volt_mv;
-#ifndef CONFIG_DRA7XX
int ret = 0;
-#endif
if (!volt_mv)
return;
pmic->pmic_bus_init();
-#ifndef CONFIG_DRA7XX
/* See if we can first get the GPIO if needed */
if (pmic->gpio_en)
ret = gpio_request(pmic->gpio, "PMIC_GPIO");
@@ -465,7 +462,7 @@ void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic)
/* Pull the GPIO low to select SET0 register, while we program SET1 */
if (pmic->gpio_en)
gpio_direction_output(pmic->gpio, 0);
-#endif
+
/* convert to uV for better accuracy in the calculations */
offset *= 1000;
@@ -476,10 +473,8 @@ void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic)
if (pmic->pmic_write(pmic->i2c_slave_addr, vcore_reg, offset_code))
printf("Scaling voltage failed for 0x%x\n", vcore_reg);
-#ifndef CONFIG_DRA7XX
if (pmic->gpio_en)
gpio_direction_output(pmic->gpio, 1);
-#endif
}
static u32 optimize_vcore_voltage(struct volts const *v)