From fd27fce042bfd289eab6dbb7c98ab3adb48ca25b Mon Sep 17 00:00:00 2001 From: Dong Aisheng Date: Thu, 5 Sep 2013 18:27:18 +0800 Subject: [PATCH] ENGR00278504-1 mmc: sdhci: add quirk for broken auto cmd23 The auto cmd23 function on some platforms may not work well, add a quirk to allow them to work without auto cmd23. Signed-off-by: Dong Aisheng --- drivers/mmc/host/sdhci.c | 1 + include/linux/mmc/sdhci.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index a69f773710b6..ce8db607a85b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2901,6 +2901,7 @@ int sdhci_add_host(struct sdhci_host *host) /* Auto-CMD23 stuff only works in ADMA or PIO. */ if ((host->version >= SDHCI_SPEC_300) && + !(host->quirks2 & SDHCI_QUIRK2_BROKEN_AUTO_CMD23) && ((host->flags & SDHCI_USE_ADMA) || !(host->flags & SDHCI_USE_SDMA))) { host->flags |= SDHCI_AUTO_CMD23; diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index b838ffc49e4a..d078ac2f3797 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -95,6 +95,7 @@ struct sdhci_host { /* The system physically doesn't support 1.8v, even if the host does */ #define SDHCI_QUIRK2_NO_1_8_V (1<<2) #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) +#define SDHCI_QUIRK2_BROKEN_AUTO_CMD23 (1<<4) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 2.39.5