diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 20 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 7 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 2 |
3 files changed, 29 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 65be27995d5c..2f15cc17d887 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -284,6 +284,18 @@ static const struct sdhci_pci_fixes sdhci_jmicron = { | |||
284 | .resume = jmicron_resume, | 284 | .resume = jmicron_resume, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | static int via_probe(struct sdhci_pci_chip *chip) | ||
288 | { | ||
289 | if (chip->pdev->revision == 0x10) | ||
290 | chip->quirks |= SDHCI_QUIRK_DELAY_AFTER_POWER; | ||
291 | |||
292 | return 0; | ||
293 | } | ||
294 | |||
295 | static const struct sdhci_pci_fixes sdhci_via = { | ||
296 | .probe = via_probe, | ||
297 | }; | ||
298 | |||
287 | static const struct pci_device_id pci_ids[] __devinitdata = { | 299 | static const struct pci_device_id pci_ids[] __devinitdata = { |
288 | { | 300 | { |
289 | .vendor = PCI_VENDOR_ID_RICOH, | 301 | .vendor = PCI_VENDOR_ID_RICOH, |
@@ -349,6 +361,14 @@ static const struct pci_device_id pci_ids[] __devinitdata = { | |||
349 | .driver_data = (kernel_ulong_t)&sdhci_jmicron, | 361 | .driver_data = (kernel_ulong_t)&sdhci_jmicron, |
350 | }, | 362 | }, |
351 | 363 | ||
364 | { | ||
365 | .vendor = PCI_VENDOR_ID_VIA, | ||
366 | .device = 0x95d0, | ||
367 | .subvendor = PCI_ANY_ID, | ||
368 | .subdevice = PCI_ANY_ID, | ||
369 | .driver_data = (kernel_ulong_t)&sdhci_via, | ||
370 | }, | ||
371 | |||
352 | { /* Generic SD host controller */ | 372 | { /* Generic SD host controller */ |
353 | PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00) | 373 | PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00) |
354 | }, | 374 | }, |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c7586739be1e..f4066fdc8906 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1057,6 +1057,13 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power) | |||
1057 | pwr |= SDHCI_POWER_ON; | 1057 | pwr |= SDHCI_POWER_ON; |
1058 | 1058 | ||
1059 | sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); | 1059 | sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); |
1060 | |||
1061 | /* | ||
1062 | * Some controllers need an extra 10ms delay of 10ms before they | ||
1063 | * can apply clock after applying power | ||
1064 | */ | ||
1065 | if ((host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER)) | ||
1066 | mdelay(10); | ||
1060 | } | 1067 | } |
1061 | 1068 | ||
1062 | /*****************************************************************************\ | 1069 | /*****************************************************************************\ |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 5d37dd94b53f..831ddf7dcb49 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -230,6 +230,8 @@ struct sdhci_host { | |||
230 | #define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21) | 230 | #define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21) |
231 | /* Controller can only handle 1-bit data transfers */ | 231 | /* Controller can only handle 1-bit data transfers */ |
232 | #define SDHCI_QUIRK_FORCE_1_BIT_DATA (1<<22) | 232 | #define SDHCI_QUIRK_FORCE_1_BIT_DATA (1<<22) |
233 | /* Controller needs 10ms delay between applying power and clock */ | ||
234 | #define SDHCI_QUIRK_DELAY_AFTER_POWER (1<<23) | ||
233 | 235 | ||
234 | int irq; /* Device IRQ */ | 236 | int irq; /* Device IRQ */ |
235 | void __iomem * ioaddr; /* Mapped address */ | 237 | void __iomem * ioaddr; /* Mapped address */ |