From 61b4aff312c9c4d483b3355ec7e4f29c17d56f9c Mon Sep 17 00:00:00 2001 From: Sahitya Tummala Date: Fri, 12 Apr 2013 11:49:11 +0530 Subject: [PATCH] mmc: sdhci-msm: Ignore data timeout error for R1B commands Ignore data timeout error for R1B commands as there will be no data associated and the busy timeout value for these commands could be lager than the maximum timeout value that controller can handle. CRs-fixed: 473435 Change-Id: I61f7463cf09648ad9fab83437abf5004effc7758 Signed-off-by: Sahitya Tummala [subhashj@codeaurora.org: fixed minor merge conflict] Signed-off-by: Subhash Jadavani --- drivers/mmc/host/sdhci-msm.c | 1 + drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 8636a4f12474..4759927abff4 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2173,6 +2173,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) host->quirks2 |= SDHCI_QUIRK2_ALWAYS_USE_BASE_CLOCK; host->quirks2 |= SDHCI_QUIRK2_IGNORE_CMDCRC_FOR_TUNING; host->quirks2 |= SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE; + host->quirks2 |= SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD; host_version = readl_relaxed((host->ioaddr + SDHCI_HOST_VERSION)); dev_dbg(&pdev->dev, "Host Version: 0x%x Vendor Version 0x%x\n", diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c12bd71d39a9..c17ac505bc2e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2594,6 +2594,9 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) host->busy_handle = 1; return; } + if (host->quirks2 & + SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD) + return; } pr_err("%s: Got data interrupt 0x%08x even " diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 46bee820fb91..1af827f3556e 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -438,6 +438,14 @@ struct sdhci_host { #define SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE (1<<20) +/* + * Ignore data timeout error for R1B commands as there will be no + * data associated and the busy timeout value for these commands + * could be lager than the maximum timeout value that controller + * can handle. + */ +#define SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD (1<<21) + int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */