sdhci: Add quirk for controllers with no end-of-busy IRQ

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, March 2, 2009 - 5:01 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f94540...
Commit:     f945405cdecd9e0ae3e58ff84cabd19b4522965e
Parent:     778ef1e6cbb049c9bcbf405936ee6f2b6e451892
Author:     Ben Dooks <ben-linux@fluff.org>
AuthorDate: Fri Feb 20 20:33:08 2009 +0300
Committer:  Pierre Ossman <drzeus@drzeus.cx>
CommitDate: Mon Mar 2 21:46:35 2009 +0100

    sdhci: Add quirk for controllers with no end-of-busy IRQ
    
    The Samsung SDHCI (and FSL eSDHC) controller block seems to fail
    to generate an INT_DATA_END after the transfer has completed and
    the bus busy state finished.
    
    Changes in e809517f6fa5803a5a1cd56026f0e2190fc13d5c to use the
    new busy method are the cause of the behaviour change.
    
    Signed-off-by: Ben Dooks <ben-linux@fluff.org>
    Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
    Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
---
 drivers/mmc/host/sdhci.c |    5 ++++-
 drivers/mmc/host/sdhci.h |    2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f52f305..accb592 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1291,8 +1291,11 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
 		if (host->cmd->data)
 			DBG("Cannot wait for busy signal when also "
 				"doing a data transfer");
-		else
+		else if (!(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ))
 			return;
+
+		/* The controller does not support the end-of-busy IRQ,
+		 * fall through and take the SDHCI_INT_RESPONSE */
 	}
 
 	if (intmask & SDHCI_INT_RESPONSE)
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index ebb8365..43c37c6 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -208,6 +208,8 @@ struct sdhci_host {
 #define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL			(1<<12)
 /* Controller has an issue with buffer bits for small transfers */
 #define SDHCI_QUIRK_BROKEN_SMALL_PIO			(1<<13)
+/* Controller does not provide transfer-complete interrupt when not busy */
+#define SDHCI_QUIRK_NO_BUSY_IRQ				(1<<14)
 
 	int			irq;		/* Device IRQ */
 	void __iomem *		ioaddr;		/* Mapped address */
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sdhci: Add quirk for controllers with no end-of-busy IRQ, Linux Kernel Mailing ..., (Mon Mar 2, 5:01 pm)