linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viswanath Puttagunta <vishp@ti.com>
To: Linux-mmc <linux-mmc@vger.kernel.org>
Cc: T Krishnamoorthy Balaji <balajitk@ti.com>,
	Venkatraman S <svenkatr@ti.com>,
	Semen Protsenko <semen.protsenko@ti.com>,
	Volodymyr Riazantsev <v.riazantsev@ti.com>,
	Viswanath Puttagunta <vishp@ti.com>
Subject: [PATCH 1/3] mmc: omap_hsmmc: Errata i705: SD hot unplug
Date: Thu, 24 May 2012 15:14:25 -0500	[thread overview]
Message-ID: <1337890467-32573-2-git-send-email-vishp@ti.com> (raw)
In-Reply-To: <1337890467-32573-1-git-send-email-vishp@ti.com>

Turn off IO & PBIAS cells and then SD card VMMC as soon
as we get disconnect interrupt. Failure to do so might
cause current spikes (latch-up issue) which can potentially
burn the IO cells.

Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 56d4499..61d830f 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1177,10 +1177,17 @@ static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id)
 		carddetect = -ENOSYS;
 	}
 
-	if (carddetect)
+	if (carddetect) {
 		mmc_detect_change(host->mmc, (HZ * 200) / 1000);
-	else
-		mmc_detect_change(host->mmc, (HZ * 50) / 1000);
+	} else {
+		if ((MMC_POWER_OFF != host->power_mode) &&
+				(mmc_slot(host).set_power != NULL)) {
+			mmc_slot(host).set_power(host->dev, host->slot_id,
+						0, 0);
+			host->power_mode = MMC_POWER_OFF;
+		}
+		mmc_detect_change(host->mmc, 0);
+	}
 	return IRQ_HANDLED;
 }
 
-- 
1.7.4.1


  reply	other threads:[~2012-05-24 20:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 20:14 [PATCH 0/3] mmc:sd hotplug fixes for omap Viswanath Puttagunta
2012-05-24 20:14 ` Viswanath Puttagunta [this message]
2012-05-25  8:37   ` [PATCH 1/3] mmc: omap_hsmmc: Errata i705: SD hot unplug S, Venkatraman
2012-05-31 16:39     ` Puttagunta, Viswanath
2012-05-24 20:14 ` [PATCH 2/3] mmc: omap_hsmmc: Errata: Fix SD card removal detection Viswanath Puttagunta
2012-05-24 20:14 ` [PATCH 3/3] mfd: Enable Debounce logic for SD hotplug detection Viswanath Puttagunta
2012-05-25  8:22   ` S, Venkatraman
2012-05-25  7:20 ` [PATCH 0/3] mmc:sd hotplug fixes for omap S, Venkatraman

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=1337890467-32573-2-git-send-email-vishp@ti.com \
    --to=vishp@ti.com \
    --cc=balajitk@ti.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=semen.protsenko@ti.com \
    --cc=svenkatr@ti.com \
    --cc=v.riazantsev@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).