]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00178290-2 mmc: sdhci: introduce QUIRK_BROKEN_AUTO_CMD23 for mx6
authorDong Aisheng <b29396@freescale.com>
Wed, 28 Mar 2012 07:58:48 +0000 (15:58 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:22 +0000 (14:11 +0200)
We observed a few commands timeout when using auto cmd23.
The root cause is still unkonwn.
This patch is a workaround to not use auto cmd23 temporarily.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mmc/host/sdhci.c
include/linux/mmc/sdhci.h

index 291ef7a5bdc486969de6d92b7979f8617e2ee066..9d7fadabeb7f92339ef35b35a2e8528932125c8f 100644 (file)
@@ -701,6 +701,9 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
                host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK
                        | SDHCI_QUIRK_BROKEN_ADMA;
 
+       if (cpu_is_mx6())
+               host->quirks2 |= SDHCI_QUIRK_BROKEN_AUTO_CMD23,
+
        /* write_protect can't be routed to controller, use gpio */
        sdhci_esdhc_ops.get_ro = esdhc_pltfm_get_ro;
 
index 428f352dd569d14683ea1eafce3b518552de406d..4d36a874e6062e5dd6e7f5aef0d4489731a0128e 100755 (executable)
@@ -2654,6 +2654,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_QUIRK_BROKEN_AUTO_CMD23) &&
            ((host->flags & SDHCI_USE_ADMA) ||
             !(host->flags & SDHCI_USE_SDMA))) {
                host->flags |= SDHCI_AUTO_CMD23;
index d9dca2739cb50cdf78300233a1c94bede18a1b19..a477e2e2093c2409f699a63b12ee27d120d576d5 100644 (file)
@@ -93,6 +93,9 @@ struct sdhci_host {
 /* The read-only detection via SDHCI_PRESENT_STATE register is unstable */
 #define SDHCI_QUIRK_UNSTABLE_RO_DETECT                 (1<<31)
 
+       unsigned int quirks2;   /* More deviations from spec. */
+#define SDHCI_QUIRK_BROKEN_AUTO_CMD23                  (1<<0)
+
        int irq;                /* Device IRQ */
        void __iomem *ioaddr;   /* Mapped address */