public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: linux-mmc@vger.kernel.org
Cc: linux-omap@vger.kernel.org,
	Thorsten Einsbein <thorsten.eisbein@head-acoustics.de>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Balaji T K <balajitk@ti.com>
Subject: [PATCH] mmc: omap_hsmmc: Add small delay after enabling power
Date: Thu, 11 Sep 2014 16:11:05 +0200	[thread overview]
Message-ID: <1410444665-24492-1-git-send-email-sr@denx.de> (raw)

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


             reply	other threads:[~2014-09-11 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 14:11 Stefan Roese [this message]
2014-09-11 14:15 ` [PATCH] mmc: omap_hsmmc: Add small delay after enabling power Ulf Hansson
2014-09-12  7:26   ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410444665-24492-1-git-send-email-sr@denx.de \
    --to=sr@denx.de \
    --cc=balajitk@ti.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=thorsten.eisbein@head-acoustics.de \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox