public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Lavinen <jarkko.lavinen@nokia.com>
To: linux-omap Mailing List <linux-omap@vger.kernel.org>
Subject: PATCH 1/2 OMAP: HSMMC: Fix HSMMC2 getting stuck with suspend/resume
Date: Tue, 21 Oct 2008 15:43:06 +0300	[thread overview]
Message-ID: <20081021124306.GA11845@angel.research.nokia.com> (raw)

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


             reply	other threads:[~2008-10-21 12:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 12:43 Jarkko Lavinen [this message]
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

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=20081021124306.GA11845@angel.research.nokia.com \
    --to=jarkko.lavinen@nokia.com \
    --cc=linux-omap@vger.kernel.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