summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/omap5/hwinit.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2017-08-21 12:50:49 +0530
committerTom Rini <trini@konsulko.com>2017-09-11 16:19:35 -0400
commit91d3e90668009a9d0175f03fe0daf5285b78c6ba (patch)
tree1c3cdd91a80447a828f7d8ffb2369eae1df7cd33 /arch/arm/mach-omap2/omap5/hwinit.c
parentbce2629887fdc1749c4b8b5bdb877756e960fbca (diff)
downloadu-boot-91d3e90668009a9d0175f03fe0daf5285b78c6ba.tar.gz
arm: omap5+: Add board specific ldo powering
It is not necessary all omap5+ based uses the same PMIC to poweron mmc. So add support for enabling mmc based on board. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap5/hwinit.c')
-rw-r--r--arch/arm/mach-omap2/omap5/hwinit.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index afe59e0b58..cb2a5ab7ea 100644
--- a/arch/arm/mach-omap2/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
@@ -455,10 +455,14 @@ void v7_arch_cp15_set_acr(u32 acr, u32 cpu_midr, u32 cpu_rev_comb,
}
#if defined(CONFIG_PALMAS_POWER)
+__weak void board_mmc_poweron_ldo(uint voltage)
+{
+ palmas_mmc1_poweron_ldo(voltage);
+}
+
void vmmc_pbias_config(uint voltage)
{
u32 value = 0;
- struct vcores_data const *vcores = *omap_vcores;
value = readl((*ctrl)->control_pbias);
value &= ~SDCARD_PWRDNZ;
@@ -467,15 +471,7 @@ void vmmc_pbias_config(uint voltage)
value &= ~SDCARD_BIAS_PWRDNZ;
writel(value, (*ctrl)->control_pbias);
- if (vcores->core.pmic->i2c_slave_addr == 0x60) {
- if (voltage == LDO_VOLT_3V0)
- voltage = 0x19;
- else if (voltage == LDO_VOLT_1V8)
- voltage = 0xa;
- lp873x_mmc1_poweron_ldo(voltage);
- } else {
- palmas_mmc1_poweron_ldo(voltage);
- }
+ board_mmc_poweron_ldo(voltage);
value = readl((*ctrl)->control_pbias);
value |= SDCARD_BIAS_PWRDNZ;