aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/sdhci.c
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2006-06-30 05:22:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-07-02 13:02:01 -0400
commit98608076a21914ab12f1c858a0cdf55366260f12 (patch)
treee027e6689c66fa3c5dfacac4d6217efc5553252c /drivers/mmc/sdhci.c
parent645289dca5021224279e67b4655796cafdfdad00 (diff)
[MMC] sdhci: force DMA on some controllers
Some controllers incorrectly report that the cannot do DMA. Forcefully enable it for those that we know it works fine on. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r--drivers/mmc/sdhci.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 7994c0b70f15..16ed2ae929d3 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -33,6 +33,7 @@ static unsigned int debug_forcedma = 0;
33static unsigned int debug_quirks = 0; 33static unsigned int debug_quirks = 0;
34 34
35#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0) 35#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0)
36#define SDHCI_QUIRK_FORCE_DMA (1<<1)
36 37
37static const struct pci_device_id pci_ids[] __devinitdata = { 38static const struct pci_device_id pci_ids[] __devinitdata = {
38 { 39 {
@@ -40,7 +41,24 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
40 .device = PCI_DEVICE_ID_RICOH_R5C822, 41 .device = PCI_DEVICE_ID_RICOH_R5C822,
41 .subvendor = PCI_VENDOR_ID_IBM, 42 .subvendor = PCI_VENDOR_ID_IBM,
42 .subdevice = PCI_ANY_ID, 43 .subdevice = PCI_ANY_ID,
43 .driver_data = SDHCI_QUIRK_CLOCK_BEFORE_RESET, 44 .driver_data = SDHCI_QUIRK_CLOCK_BEFORE_RESET |
45 SDHCI_QUIRK_FORCE_DMA,
46 },
47
48 {
49 .vendor = PCI_VENDOR_ID_RICOH,
50 .device = PCI_DEVICE_ID_RICOH_R5C822,
51 .subvendor = PCI_ANY_ID,
52 .subdevice = PCI_ANY_ID,
53 .driver_data = SDHCI_QUIRK_FORCE_DMA,
54 },
55
56 {
57 .vendor = PCI_VENDOR_ID_TI,
58 .device = PCI_DEVICE_ID_TI_XX21_XX11_SD,
59 .subvendor = PCI_ANY_ID,
60 .subdevice = PCI_ANY_ID,
61 .driver_data = SDHCI_QUIRK_FORCE_DMA,
44 }, 62 },
45 63
46 { /* Generic SD host controller */ 64 { /* Generic SD host controller */
@@ -1190,7 +1208,9 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1190 else if (debug_forcedma) { 1208 else if (debug_forcedma) {
1191 DBG("DMA forced on\n"); 1209 DBG("DMA forced on\n");
1192 host->flags |= SDHCI_USE_DMA; 1210 host->flags |= SDHCI_USE_DMA;
1193 } else if ((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) 1211 } else if (chip->quirks & SDHCI_QUIRK_FORCE_DMA)
1212 host->flags |= SDHCI_USE_DMA;
1213 else if ((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA)
1194 DBG("Controller doesn't have DMA interface\n"); 1214 DBG("Controller doesn't have DMA interface\n");
1195 else if (!(caps & SDHCI_CAN_DO_DMA)) 1215 else if (!(caps & SDHCI_CAN_DO_DMA))
1196 DBG("Controller doesn't have DMA capability\n"); 1216 DBG("Controller doesn't have DMA capability\n");