All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: omap_hsmmc: Add small delay after enabling power
@ 2014-09-11 14:11 Stefan Roese
  2014-09-11 14:15 ` Ulf Hansson
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2014-09-11 14:11 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-omap, Thorsten Einsbein, Ulf Hansson, Balaji T K

From: Thorsten Einsbein <thorsten.eisbein@head-acoustics.de>

On the TAO3530 (OMAP3530 based) we noticed that some SD cards are not
detected reliably upon bootup (timeout). Especially the SanDisk Ultra
8GiB seems to be problematic here. The SanDisk Extreme also has this
problem on this platform, but not that often. A Samsung 8 GiB type 6
doesn't show this problem at all.

This patch now adds a short delay after enabling the power on the slot.
With this delay all cards are detected reliably.

Signed-off-by: Thorsten Einsbein <thorsten.eisbein@head-acoustics.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Balaji T K <balajitk@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 9656726..62ff0a7 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -335,6 +335,10 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
 				ret = mmc_regulator_set_ocr(host->mmc,
 							host->vcc, 0);
 		}
+
+		dev_dbg(host->dev, "omap_hsmmc_set_power: wait a little (slot %d)\n",
+			slot);
+		msleep(5);
 	} else {
 		/* Shut down the rail */
 		if (host->vcc_aux)
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: omap_hsmmc: Add small delay after enabling power
  2014-09-11 14:11 [PATCH] mmc: omap_hsmmc: Add small delay after enabling power Stefan Roese
@ 2014-09-11 14:15 ` Ulf Hansson
  2014-09-12  7:26   ` Stefan Roese
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2014-09-11 14:15 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linux-mmc, linux-omap, Thorsten Einsbein, Balaji T K

On 11 September 2014 16:11, Stefan Roese <sr@denx.de> wrote:
> From: Thorsten Einsbein <thorsten.eisbein@head-acoustics.de>
>
> On the TAO3530 (OMAP3530 based) we noticed that some SD cards are not
> detected reliably upon bootup (timeout). Especially the SanDisk Ultra
> 8GiB seems to be problematic here. The SanDisk Extreme also has this
> problem on this platform, but not that often. A Samsung 8 GiB type 6
> doesn't show this problem at all.
>
> This patch now adds a short delay after enabling the power on the slot.
> With this delay all cards are detected reliably.

Is this delay related to regulator ramp up/down time? Then I think it
maybe should be a part of the regulator code/DT.

Kind regards
Uffe

>
> Signed-off-by: Thorsten Einsbein <thorsten.eisbein@head-acoustics.de>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Balaji T K <balajitk@ti.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 9656726..62ff0a7 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -335,6 +335,10 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
>                                 ret = mmc_regulator_set_ocr(host->mmc,
>                                                         host->vcc, 0);
>                 }
> +
> +               dev_dbg(host->dev, "omap_hsmmc_set_power: wait a little (slot %d)\n",
> +                       slot);
> +               msleep(5);
>         } else {
>                 /* Shut down the rail */
>                 if (host->vcc_aux)
> --
> 2.1.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: omap_hsmmc: Add small delay after enabling power
  2014-09-11 14:15 ` Ulf Hansson
@ 2014-09-12  7:26   ` Stefan Roese
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2014-09-12  7:26 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, linux-omap, Thorsten Einsbein, Balaji T K

On 11.09.2014 16:15, Ulf Hansson wrote:
> On 11 September 2014 16:11, Stefan Roese <sr@denx.de> wrote:
>> From: Thorsten Einsbein <thorsten.eisbein@head-acoustics.de>
>>
>> On the TAO3530 (OMAP3530 based) we noticed that some SD cards are not
>> detected reliably upon bootup (timeout). Especially the SanDisk Ultra
>> 8GiB seems to be problematic here. The SanDisk Extreme also has this
>> problem on this platform, but not that often. A Samsung 8 GiB type 6
>> doesn't show this problem at all.
>>
>> This patch now adds a short delay after enabling the power on the slot.
>> With this delay all cards are detected reliably.
>
> Is this delay related to regulator ramp up/down time? Then I think it
> maybe should be a part of the regulator code/DT.

Thanks for this feedback. Yes, adding "regulator-enable-ramp-delay" to 
the regulator(s) solves this issue too. I wasn't aware of that one.

The patch can be dropped.

Thanks,
Stefan


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-12  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 14:11 [PATCH] mmc: omap_hsmmc: Add small delay after enabling power Stefan Roese
2014-09-11 14:15 ` Ulf Hansson
2014-09-12  7:26   ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.