Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sdhci: force high speed capability on some controllers

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>

+6 -2
+2 -1
drivers/mmc/host/sdhci-pci.c
··· 144 144 SDHCI_QUIRK_32BIT_DMA_SIZE | 145 145 SDHCI_QUIRK_32BIT_ADMA_SIZE | 146 146 SDHCI_QUIRK_RESET_AFTER_REQUEST | 147 - SDHCI_QUIRK_BROKEN_SMALL_PIO; 147 + SDHCI_QUIRK_BROKEN_SMALL_PIO | 148 + SDHCI_QUIRK_FORCE_HIGHSPEED; 148 149 } 149 150 150 151 /*
+2 -1
drivers/mmc/host/sdhci.c
··· 1631 1631 mmc->f_max = host->max_clk; 1632 1632 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; 1633 1633 1634 - if (caps & SDHCI_CAN_DO_HISPD) 1634 + if ((caps & SDHCI_CAN_DO_HISPD) || 1635 + (host->quirks & SDHCI_QUIRK_FORCE_HIGHSPEED)) 1635 1636 mmc->caps |= MMC_CAP_SD_HIGHSPEED; 1636 1637 1637 1638 mmc->ocr_avail = 0;
+2
drivers/mmc/host/sdhci.h
··· 208 208 #define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<12) 209 209 /* Controller has an issue with buffer bits for small transfers */ 210 210 #define SDHCI_QUIRK_BROKEN_SMALL_PIO (1<<13) 211 + /* Controller supports high speed but doesn't have the caps bit set */ 212 + #define SDHCI_QUIRK_FORCE_HIGHSPEED (1<<14) 211 213 212 214 int irq; /* Device IRQ */ 213 215 void __iomem * ioaddr; /* Mapped address */