diff options
-rw-r--r-- | drivers/mmc/host/sdhci.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 866528c4ac10..2b4a86c55a94 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -35,6 +35,7 @@ static unsigned int debug_quirks = 0; | |||
35 | #define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2) | 35 | #define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2) |
36 | #define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3) | 36 | #define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3) |
37 | #define SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS (1<<4) | 37 | #define SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS (1<<4) |
38 | #define SDHCI_QUIRK_BROKEN_DMA (1<<5) | ||
38 | 39 | ||
39 | static const struct pci_device_id pci_ids[] __devinitdata = { | 40 | static const struct pci_device_id pci_ids[] __devinitdata = { |
40 | { | 41 | { |
@@ -68,7 +69,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = { | |||
68 | .device = PCI_DEVICE_ID_ENE_CB712_SD, | 69 | .device = PCI_DEVICE_ID_ENE_CB712_SD, |
69 | .subvendor = PCI_ANY_ID, | 70 | .subvendor = PCI_ANY_ID, |
70 | .subdevice = PCI_ANY_ID, | 71 | .subdevice = PCI_ANY_ID, |
71 | .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE, | 72 | .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE | |
73 | SDHCI_QUIRK_BROKEN_DMA, | ||
72 | }, | 74 | }, |
73 | 75 | ||
74 | { | 76 | { |
@@ -76,7 +78,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = { | |||
76 | .device = PCI_DEVICE_ID_ENE_CB712_SD_2, | 78 | .device = PCI_DEVICE_ID_ENE_CB712_SD_2, |
77 | .subvendor = PCI_ANY_ID, | 79 | .subvendor = PCI_ANY_ID, |
78 | .subdevice = PCI_ANY_ID, | 80 | .subdevice = PCI_ANY_ID, |
79 | .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE, | 81 | .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE | |
82 | SDHCI_QUIRK_BROKEN_DMA, | ||
80 | }, | 83 | }, |
81 | 84 | ||
82 | { | 85 | { |
@@ -1304,6 +1307,12 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1304 | else | 1307 | else |
1305 | host->flags |= SDHCI_USE_DMA; | 1308 | host->flags |= SDHCI_USE_DMA; |
1306 | 1309 | ||
1310 | if ((chip->quirks & SDHCI_QUIRK_BROKEN_DMA) && | ||
1311 | (host->flags & SDHCI_USE_DMA)) { | ||
1312 | DBG("Disabling DMA as it is marked broken"); | ||
1313 | host->flags &= ~SDHCI_USE_DMA; | ||
1314 | } | ||
1315 | |||
1307 | if (((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) && | 1316 | if (((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) && |
1308 | (host->flags & SDHCI_USE_DMA)) { | 1317 | (host->flags & SDHCI_USE_DMA)) { |
1309 | printk(KERN_WARNING "%s: Will use DMA " | 1318 | printk(KERN_WARNING "%s: Will use DMA " |