public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH 1/2 OMAP: HSMMC: Fix HSMMC2 getting stuck with suspend/resume
@ 2008-10-21 12:43 Jarkko Lavinen
  2008-10-21 12:46 ` PATCH 2/2 OMAP: HSMMC: Disable the mmc clocks when not needed Jarkko Lavinen
  2008-10-28 16:45 ` PATCH 1/2 OMAP: HSMMC: Fix HSMMC2 getting stuck with suspend/resume Tony Lindgren
  0 siblings, 2 replies; 5+ messages in thread
From: Jarkko Lavinen @ 2008-10-21 12:43 UTC (permalink / raw)
  To: linux-omap Mailing List

HSMMC2 was stuck on a test board when resuming from
suspend. After the resume the first command CMD0 is written to
command register and then we wait for an interrupt. After the CMD0 
was written, no interrupt occured. No EOC, no timeout nor other error.
This jammed the request.

The problem was a wrong 3.0V voltage setting being applied into
HCTL before turning SDBP bit on. After fixing the voltage to 1.8V
suspend-resume started to work correctly.

Cheers
Jarkko Lavinen

>From 1be795080e89cca6e637f88a4e14026aee0a75e8 Mon Sep 17 00:00:00 2001
From: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Date: Mon, 20 Oct 2008 11:23:45 +0300
Subject: [PATCH] OMAP: HSMMC: Fix HSMMC2 getting stuck with suspend/resume

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
---
 drivers/mmc/host/omap_hsmmc.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 00b1b68..edd1ce0 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1068,15 +1068,16 @@ static int omap_mmc_suspend(struct platform_device *pdev, pm_message_t state)
 			}
 
 			if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
-				OMAP_HSMMC_WRITE(host->base, HCTL,
-					OMAP_HSMMC_READ(host->base, HCTL)
-					& SDVSCLR);
-				OMAP_HSMMC_WRITE(host->base, HCTL,
-					OMAP_HSMMC_READ(host->base, HCTL)
-					| SDVS30);
-				OMAP_HSMMC_WRITE(host->base, HCTL,
-					OMAP_HSMMC_READ(host->base, HCTL)
-					| SDBP);
+				u32 hctl = OMAP_HSMMC_READ(host->base, HCTL) &
+					SDVSCLR;
+
+				if (host->id == OMAP_MMC1_DEVID)
+					hctl |= SDVS30;
+				else
+					hctl |= SDVS18;
+
+				OMAP_HSMMC_WRITE(host->base, HCTL, hctl);
+				OMAP_HSMMC_WRITE(host->base, HCTL, hctl | SDBP);
 			}
 
 			clk_disable(host->fclk);
-- 
1.5.6.5


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

end of thread, other threads:[~2008-10-28 16:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21 12:43 PATCH 1/2 OMAP: HSMMC: Fix HSMMC2 getting stuck with suspend/resume Jarkko Lavinen
2008-10-21 12:46 ` PATCH 2/2 OMAP: HSMMC: Disable the mmc clocks when not needed Jarkko Lavinen
2008-10-21 14:25   ` Jarkko Lavinen
2008-10-21 17:42   ` David Brownell
2008-10-28 16:45 ` PATCH 1/2 OMAP: HSMMC: Fix HSMMC2 getting stuck with suspend/resume Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox