board-msm7627a-storage: Fix wrong regulator assignment for SDC2, SDC4 slots
SDC2 and SDC4 slots are powered through always on S3 regulator,
but they are initialized with LDO13 regulator. This causes
LDO13 to be on whenever these slots are active even though
the SDC1 (which is actually powered through LDO13) is not
interested, and in worst case, if SD card is present this
can cause additional idle state current leakage on SDC1_VDD line.
CRs-Fixed: 337704
Change-Id: If1d80ff420bb578f2fa891d83fc5927c784a599d
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7627a-storage.c b/arch/arm/mach-msm/board-msm7627a-storage.c
index a10d81a..88a519d 100644
--- a/arch/arm/mach-msm/board-msm7627a-storage.c
+++ b/arch/arm/mach-msm/board-msm7627a-storage.c
@@ -26,6 +26,7 @@
|| defined(CONFIG_MMC_MSM_SDC3_SUPPORT)\
|| defined(CONFIG_MMC_MSM_SDC4_SUPPORT))
+#define MAX_SDCC_CONTROLLER 4
static unsigned long vreg_sts, gpio_sts;
struct sdcc_gpio {
@@ -152,7 +153,7 @@
gpio_sdc1_hw_det = 42;
}
-static struct regulator *sdcc_vreg_data[ARRAY_SIZE(sdcc_cfg_data)];
+static struct regulator *sdcc_vreg_data[MAX_SDCC_CONTROLLER];
static int msm_sdcc_setup_gpio(int dev_id, unsigned int enable)
{
int rc = 0;
@@ -377,14 +378,14 @@
#endif
/* SDIO WLAN slot */
#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
- if (mmc_regulator_init(2, "mmc", 2850000))
+ if (mmc_regulator_init(2, "smps3", 1800000))
return;
msm_add_sdcc(2, &sdc2_plat_data);
#endif
/* Not Used */
#if (defined(CONFIG_MMC_MSM_SDC4_SUPPORT)\
&& !defined(CONFIG_MMC_MSM_SDC3_8_BIT_SUPPORT))
- if (mmc_regulator_init(4, "mmc", 2850000))
+ if (mmc_regulator_init(4, "smps3", 1800000))
return;
msm_add_sdcc(4, &sdc4_plat_data);
#endif