linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kishon@ti.com (Kishon Vijay Abraham I)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/11] mmc: host: omap_hsmmc: Workaround for errata id i802
Date: Thu, 30 Jul 2015 13:16:31 +0530	[thread overview]
Message-ID: <1438242394-25599-9-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1438242394-25599-1-git-send-email-kishon@ti.com>

According to errata i802, DCRC error interrupts
(MMCHS_STAT[21] DCRC=0x1) can occur during the tuning procedure.

The DCRC interrupt, occurs when the last tuning block fails
(the last ratio tested). The delay from CRC check until the
interrupt is asserted is bigger than the delay until assertion
of the tuning end flag. Assertion of tuning end flag is what
masks the interrupts. Because of this race, an erroneous DCRC
interrupt occurs.

The suggested  workaround is to disable DCRC interrupts during
the tuning procedure which is implemented here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index dcfa92e..96dd406 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -656,8 +656,17 @@ static void omap_hsmmc_enable_irq(struct omap_hsmmc_host *host,
 	is_tuning = (cmd->opcode == MMC_SEND_TUNING_BLOCK) ||
 		    (cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200);
 
-	if (!is_tuning && host->use_dma)
+	if (is_tuning) {
+		/*
+		 * OMAP5/DRA74X/DRA72x Errata i802:
+		 * DCRC error interrupts (MMCHS_STAT[21] DCRC=0x1) can occur
+		 * during the tuning procedure. So disable it during the
+		 * tuning procedure.
+		 */
+		irq_mask &= ~DCRC_EN;
+	} else if (host->use_dma) {
 		irq_mask &= ~(BRR_EN | BWR_EN);
+	}
 
 	/* Disable timeout for erases */
 	if (cmd->opcode == MMC_ERASE)
-- 
1.7.9.5

  parent reply	other threads:[~2015-07-30  7:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  7:46 [PATCH 00/11] omap_hsmmc: voltage switching and tuning Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 01/11] mmc: host: omap_hsmmc: Support vmmc_aux to switch to 1.8v Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 02/11] mmc: host: omap_hsmmc: separate setting voltage capabilities from bus power Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 03/11] mmc: host: omap_hsmmc: program HCTL based on signal_voltage set by mmc core Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 04/11] mmc: host: omap_hsmmc: add voltage switch support for UHS SD card Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 05/11] mmc: host: omap_hsmmc: set clk rate to the max frequency Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 06/11] mmc: host: omap_hsmmc: set timing in the UHSMS field Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 07/11] mmc: host: omap_hsmmc: add tuning support Kishon Vijay Abraham I
2015-07-30  7:46 ` Kishon Vijay Abraham I [this message]
2015-07-30  7:46 ` [PATCH 09/11] mmc: host: omap_hsmmc: Allow io voltage switch even for fixed vdd Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 10/11] mmc: host: omap_hsmmc: remove incorrect voltage switch sequence Kishon Vijay Abraham I
2015-07-30  7:46 ` [PATCH 11/11] mmc: host: omap_hsmmc: add software timer when timeout greater than hardware capablility Kishon Vijay Abraham I
2015-08-05 10:43 ` [PATCH 00/11] omap_hsmmc: voltage switching and tuning Tony Lindgren
2015-08-05 15:00   ` Kishon Vijay Abraham I
2015-08-06  6:48     ` Tony Lindgren
2015-08-07 14:45       ` Kishon Vijay Abraham I
2015-08-11 10:40         ` 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=1438242394-25599-9-git-send-email-kishon@ti.com \
    --to=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).