Commit b1c1df7a authored by Balaji T K's avatar Balaji T K Committed by Tony Lindgren

ARM: OMAP4: MMC: no regulator off during probe for eMMC

eMMC does not handle power off when not in sleep state,
Skip regulator disable during probe when eMMC is
not in known state - state left by bootloader.

Resolves eMMC failure on OMAP4
mmc0: error -110 whilst initialising MMC card
Signed-off-by: default avatarBalaji T K <balajitk@ti.com>
Tested-by: default avatarKishore Kadiyala <kishore.kadiyala@ti.com>
Acked-by: default avatarKishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e68273ba
...@@ -322,6 +322,7 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -322,6 +322,7 @@ static struct omap2_hsmmc_info mmc[] = {
.gpio_wp = -EINVAL, .gpio_wp = -EINVAL,
.nonremovable = true, .nonremovable = true,
.ocr_mask = MMC_VDD_29_30, .ocr_mask = MMC_VDD_29_30,
.no_off_init = true,
}, },
{ {
.mmc = 1, .mmc = 1,
......
...@@ -331,6 +331,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, ...@@ -331,6 +331,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
if (c->no_off) if (c->no_off)
mmc->slots[0].no_off = 1; mmc->slots[0].no_off = 1;
if (c->no_off_init)
mmc->slots[0].no_regulator_off_init = c->no_off_init;
if (c->vcc_aux_disable_is_sleep) if (c->vcc_aux_disable_is_sleep)
mmc->slots[0].vcc_aux_disable_is_sleep = 1; mmc->slots[0].vcc_aux_disable_is_sleep = 1;
......
...@@ -18,6 +18,7 @@ struct omap2_hsmmc_info { ...@@ -18,6 +18,7 @@ struct omap2_hsmmc_info {
bool nonremovable; /* Nonremovable e.g. eMMC */ bool nonremovable; /* Nonremovable e.g. eMMC */
bool power_saving; /* Try to sleep or power off when possible */ bool power_saving; /* Try to sleep or power off when possible */
bool no_off; /* power_saving and power is not to go off */ bool no_off; /* power_saving and power is not to go off */
bool no_off_init; /* no power off when not in MMC sleep state */
bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */ bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */
int gpio_cd; /* or -EINVAL */ int gpio_cd; /* or -EINVAL */
int gpio_wp; /* or -EINVAL */ int gpio_wp; /* or -EINVAL */
......
...@@ -101,6 +101,9 @@ struct omap_mmc_platform_data { ...@@ -101,6 +101,9 @@ struct omap_mmc_platform_data {
/* If using power_saving and the MMC power is not to go off */ /* If using power_saving and the MMC power is not to go off */
unsigned no_off:1; unsigned no_off:1;
/* eMMC does not handle power off when not in sleep state */
unsigned no_regulator_off_init:1;
/* Regulator off remapped to sleep */ /* Regulator off remapped to sleep */
unsigned vcc_aux_disable_is_sleep:1; unsigned vcc_aux_disable_is_sleep:1;
......
...@@ -435,6 +435,9 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) ...@@ -435,6 +435,9 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
reg = regulator_get(host->dev, "vmmc_aux"); reg = regulator_get(host->dev, "vmmc_aux");
host->vcc_aux = IS_ERR(reg) ? NULL : reg; host->vcc_aux = IS_ERR(reg) ? NULL : reg;
/* For eMMC do not power off when not in sleep state */
if (mmc_slot(host).no_regulator_off_init)
return 0;
/* /*
* UGLY HACK: workaround regulator framework bugs. * UGLY HACK: workaround regulator framework bugs.
* When the bootloader leaves a supply active, it's * When the bootloader leaves a supply active, it's
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment