aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 5b74c8cf4409..2b3f06a024f2 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -57,6 +57,8 @@ static unsigned int debug_quirks = 0;
57#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<8) 57#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<8)
58/* Controller needs voltage and power writes to happen separately */ 58/* Controller needs voltage and power writes to happen separately */
59#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1<<9) 59#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1<<9)
60/* Controller has an off-by-one issue with timeout value */
61#define SDHCI_QUIRK_INCR_TIMEOUT_CONTROL (1<<10)
60 62
61static const struct pci_device_id pci_ids[] __devinitdata = { 63static const struct pci_device_id pci_ids[] __devinitdata = {
62 { 64 {
@@ -134,7 +136,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
134 .device = PCI_DEVICE_ID_MARVELL_CAFE_SD, 136 .device = PCI_DEVICE_ID_MARVELL_CAFE_SD,
135 .subvendor = PCI_ANY_ID, 137 .subvendor = PCI_ANY_ID,
136 .subdevice = PCI_ANY_ID, 138 .subdevice = PCI_ANY_ID,
137 .driver_data = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER, 139 .driver_data = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
140 SDHCI_QUIRK_INCR_TIMEOUT_CONTROL,
138 }, 141 },
139 142
140 { 143 {
@@ -479,6 +482,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
479 break; 482 break;
480 } 483 }
481 484
485 /*
486 * Compensate for an off-by-one error in the CaFe hardware; otherwise,
487 * a too-small count gives us interrupt timeouts.
488 */
489 if ((host->chip->quirks & SDHCI_QUIRK_INCR_TIMEOUT_CONTROL))
490 count++;
491
482 if (count >= 0xF) { 492 if (count >= 0xF) {
483 printk(KERN_WARNING "%s: Too large timeout requested!\n", 493 printk(KERN_WARNING "%s: Too large timeout requested!\n",
484 mmc_hostname(host->mmc)); 494 mmc_hostname(host->mmc));