mmc: sdhci: add quirk for broken HS200 support
authorDavid Cohen <david.a.cohen@linux.intel.com>
Tue, 29 Oct 2013 17:58:26 +0000 (10:58 -0700)
committerChris Ball <chris@printf.net>
Mon, 13 Jan 2014 18:03:18 +0000 (13:03 -0500)
This patch defines a quirk for platforms unable to enable HS200 support.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Reviewed-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Acked-by: Dong Aisheng <b29396@freescale.com>
Cc: stable <stable@vger.kernel.org> # [3.13]
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/sdhci.c
include/linux/mmc/sdhci.h

index cc00bed3e20091a9be56f8ee238b25e40f38fe11..ec3eb30845c76fb5295a5c2027319d289ce9dd1d 100644 (file)
@@ -3016,7 +3016,8 @@ int sdhci_add_host(struct sdhci_host *host)
                /* SD3.0: SDR104 is supported so (for eMMC) the caps2
                 * field can be promoted to support HS200.
                 */
-               mmc->caps2 |= MMC_CAP2_HS200;
+               if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_HS200))
+                       mmc->caps2 |= MMC_CAP2_HS200;
        } else if (caps[1] & SDHCI_SUPPORT_SDR50)
                mmc->caps |= MMC_CAP_UHS_SDR50;
 
index 3e781b8c0be74dd76e658c4ba78ecbb72516e153..362927c48f978904d1eb86c57e34e5f267f93f10 100644 (file)
@@ -98,6 +98,8 @@ struct sdhci_host {
 #define SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON              (1<<4)
 /* Controller has a non-standard host control register */
 #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL               (1<<5)
+/* Controller does not support HS200 */
+#define SDHCI_QUIRK2_BROKEN_HS200                      (1<<6)
 
        int irq;                /* Device IRQ */
        void __iomem *ioaddr;   /* Mapped address */