]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sdhci: force high speed capability on some controllers
authorPierre Ossman <drzeus@drzeus.cx>
Sat, 16 Aug 2008 18:43:04 +0000 (20:43 +0200)
committerPierre Ossman <drzeus@drzeus.cx>
Sun, 12 Oct 2008 09:04:32 +0000 (11:04 +0200)
Some high speed capable controllers forget to set the high speed
capability bit. Make sure we enable the functionality anyway.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/sdhci-pci.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index fcb14c2346ccd186f0aef38b96f6405bb1380dc1..0a84f10d719c2e2a8f4c37b4696bc3f1dc1e7d2b 100644 (file)
@@ -144,7 +144,8 @@ static int jmicron_probe(struct sdhci_pci_chip *chip)
                          SDHCI_QUIRK_32BIT_DMA_SIZE |
                          SDHCI_QUIRK_32BIT_ADMA_SIZE |
                          SDHCI_QUIRK_RESET_AFTER_REQUEST |
-                         SDHCI_QUIRK_BROKEN_SMALL_PIO;
+                         SDHCI_QUIRK_BROKEN_SMALL_PIO |
+                         SDHCI_QUIRK_FORCE_HIGHSPEED;
        }
 
        /*
index fd2dc821e40d955b76d33d5b95187cbe18a77f1e..3c808d22f9d59b78e0d7d86299a69acf3129eff1 100644 (file)
@@ -1631,7 +1631,8 @@ int sdhci_add_host(struct sdhci_host *host)
        mmc->f_max = host->max_clk;
        mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
 
-       if (caps & SDHCI_CAN_DO_HISPD)
+       if ((caps & SDHCI_CAN_DO_HISPD) ||
+               (host->quirks & SDHCI_QUIRK_FORCE_HIGHSPEED))
                mmc->caps |= MMC_CAP_SD_HIGHSPEED;
 
        mmc->ocr_avail = 0;
index 197d4a05f4ae975ecf1fe600adcf9ec2ce79fbb5..31f4b1528e76137a43219c5b8d8ba7fb82d625c8 100644 (file)
@@ -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 supports high speed but doesn't have the caps bit set */
+#define SDHCI_QUIRK_FORCE_HIGHSPEED                    (1<<14)
 
        int                     irq;            /* Device IRQ */
        void __iomem *          ioaddr;         /* Mapped address */