diff options
author | Balaji T K <balajitk@ti.com> | 2011-05-30 10:25:34 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-06-01 05:25:04 -0400 |
commit | b1c1df7a7d50bf94de89704e963467bc94b1fef9 (patch) | |
tree | be95cd2ed5cc248ac22cb31f3e6da382b135f41f | |
parent | e68273baf30390e9c907831b47384085c7f664d5 (diff) |
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: Balaji T K <balajitk@ti.com>
Tested-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mmc.h | 3 | ||||
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 3 |
5 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 9ea26947eb05..63de2d396e2d 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -322,6 +322,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
322 | .gpio_wp = -EINVAL, | 322 | .gpio_wp = -EINVAL, |
323 | .nonremovable = true, | 323 | .nonremovable = true, |
324 | .ocr_mask = MMC_VDD_29_30, | 324 | .ocr_mask = MMC_VDD_29_30, |
325 | .no_off_init = true, | ||
325 | }, | 326 | }, |
326 | { | 327 | { |
327 | .mmc = 1, | 328 | .mmc = 1, |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index b2f30bed5a20..857f7daa3286 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -331,6 +331,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
331 | if (c->no_off) | 331 | if (c->no_off) |
332 | mmc->slots[0].no_off = 1; | 332 | mmc->slots[0].no_off = 1; |
333 | 333 | ||
334 | if (c->no_off_init) | ||
335 | mmc->slots[0].no_regulator_off_init = c->no_off_init; | ||
336 | |||
334 | if (c->vcc_aux_disable_is_sleep) | 337 | if (c->vcc_aux_disable_is_sleep) |
335 | mmc->slots[0].vcc_aux_disable_is_sleep = 1; | 338 | mmc->slots[0].vcc_aux_disable_is_sleep = 1; |
336 | 339 | ||
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index f119348827d4..f757e78d4d4f 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h | |||
@@ -18,6 +18,7 @@ struct omap2_hsmmc_info { | |||
18 | bool nonremovable; /* Nonremovable e.g. eMMC */ | 18 | bool nonremovable; /* Nonremovable e.g. eMMC */ |
19 | bool power_saving; /* Try to sleep or power off when possible */ | 19 | bool power_saving; /* Try to sleep or power off when possible */ |
20 | bool no_off; /* power_saving and power is not to go off */ | 20 | bool no_off; /* power_saving and power is not to go off */ |
21 | bool no_off_init; /* no power off when not in MMC sleep state */ | ||
21 | bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */ | 22 | bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */ |
22 | int gpio_cd; /* or -EINVAL */ | 23 | int gpio_cd; /* or -EINVAL */ |
23 | int gpio_wp; /* or -EINVAL */ | 24 | int gpio_wp; /* or -EINVAL */ |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index f38fef9f1310..c7b874186c27 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
@@ -101,6 +101,9 @@ struct omap_mmc_platform_data { | |||
101 | /* If using power_saving and the MMC power is not to go off */ | 101 | /* If using power_saving and the MMC power is not to go off */ |
102 | unsigned no_off:1; | 102 | unsigned no_off:1; |
103 | 103 | ||
104 | /* eMMC does not handle power off when not in sleep state */ | ||
105 | unsigned no_regulator_off_init:1; | ||
106 | |||
104 | /* Regulator off remapped to sleep */ | 107 | /* Regulator off remapped to sleep */ |
105 | unsigned vcc_aux_disable_is_sleep:1; | 108 | unsigned vcc_aux_disable_is_sleep:1; |
106 | 109 | ||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 259ece047afc..5b2e2155b413 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -435,6 +435,9 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
435 | reg = regulator_get(host->dev, "vmmc_aux"); | 435 | reg = regulator_get(host->dev, "vmmc_aux"); |
436 | host->vcc_aux = IS_ERR(reg) ? NULL : reg; | 436 | host->vcc_aux = IS_ERR(reg) ? NULL : reg; |
437 | 437 | ||
438 | /* For eMMC do not power off when not in sleep state */ | ||
439 | if (mmc_slot(host).no_regulator_off_init) | ||
440 | return 0; | ||
438 | /* | 441 | /* |
439 | * UGLY HACK: workaround regulator framework bugs. | 442 | * UGLY HACK: workaround regulator framework bugs. |
440 | * When the bootloader leaves a supply active, it's | 443 | * When the bootloader leaves a supply active, it's |