All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yangbo Lu <yangbo.lu@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [v2, 1/5] mmc: fsl_esdhc: don't set XFERTYP_RSPTYP_48_BUSY for CMD with busy response
Date: Tue, 2 Aug 2016 17:20:49 +0800	[thread overview]
Message-ID: <1470129653-15854-1-git-send-email-yangbo.lu@nxp.com> (raw)

For CMD with busy response, the eSDHC driver would poll DAT0 until
CMD completion rather than polling IRQSTAT. So, don't set
XFERTYP_RSPTYP_48_BUSY to avoid interrupts (DTOE or TC) in IRQSTAT.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
Changes for v2:
	- None
---
 drivers/mmc/fsl_esdhc.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index a865c7b..b23845d 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -136,8 +136,16 @@ static uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data)
 		xfertyp |= XFERTYP_CICEN;
 	if (cmd->resp_type & MMC_RSP_136)
 		xfertyp |= XFERTYP_RSPTYP_136;
-	else if (cmd->resp_type & MMC_RSP_BUSY)
-		xfertyp |= XFERTYP_RSPTYP_48_BUSY;
+	/*
+	 * For CMD with busy response, the eSDHC driver would poll DAT0
+	 * until CMD completion rather than polling IRQSTAT. So, don't
+	 * set XFERTYP_RSPTYP_48_BUSY to avoid interrupts (DTOE or TC)
+	 * in IRQSTAT.
+	 *
+	 * Remove:
+	 * else if (cmd->resp_type & MMC_RSP_BUSY)
+	 *      xfertyp |= XFERTYP_RSPTYP_48_BUSY;
+	 */
 	else if (cmd->resp_type & MMC_RSP_PRESENT)
 		xfertyp |= XFERTYP_RSPTYP_48;
 
-- 
2.1.0.27.g96db324

             reply	other threads:[~2016-08-02  9:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20160802093216epcas1p3014f45a6e056250186c88f62b11538a5@epcas1p3.samsung.com>
2016-08-02  9:20 ` Yangbo Lu [this message]
2016-08-02  9:20   ` [U-Boot] [v2, 2/5] mmc: send STOP command when the READ/WRITE commands fail Yangbo Lu
2016-09-19  0:08     ` Jaehoon Chung
2016-09-23  7:38       ` Y.B. Lu
2016-11-14 17:00         ` york sun
2016-08-02  9:20   ` [U-Boot] [v2, 3/5] mmc: fsl_esdhc: add error recovery for data transfer with Auto CMD12 Yangbo Lu
2016-08-02  9:20   ` [U-Boot] [v2, 4/5] mmc: add workaround for eSDHC erratum A009620 Yangbo Lu
2016-09-19  0:15     ` Jaehoon Chung
2016-09-23  7:58       ` Y.B. Lu
2016-08-02  9:20   ` [U-Boot] [v2, 5/5] arch/arm, arch/powerpc: enable " Yangbo Lu
2016-10-18  7:39     ` Y.B. Lu
2016-10-18 14:20       ` york sun
2016-09-12 19:23   ` [U-Boot] [v2, 1/5] mmc: fsl_esdhc: don't set XFERTYP_RSPTYP_48_BUSY for CMD with busy response york sun
2016-09-13  7:30     ` Y.B. Lu
2016-09-19  0:16       ` Jaehoon Chung
2016-09-23  7:59         ` Y.B. Lu
2016-09-19  0:06   ` Jaehoon Chung
2016-09-23  7:34     ` Y.B. Lu

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=1470129653-15854-1-git-send-email-yangbo.lu@nxp.com \
    --to=yangbo.lu@nxp.com \
    --cc=u-boot@lists.denx.de \
    /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 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.