aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/sdhci-pci.c')
-rw-r--r--drivers/mmc/host/sdhci-pci.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 5c3a1767770a..8e1020cf73f4 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -80,9 +80,6 @@ struct sdhci_pci_chip {
80 80
81static int ricoh_probe(struct sdhci_pci_chip *chip) 81static int ricoh_probe(struct sdhci_pci_chip *chip)
82{ 82{
83 if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_IBM)
84 chip->quirks |= SDHCI_QUIRK_CLOCK_BEFORE_RESET;
85
86 if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG || 83 if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG ||
87 chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SONY) 84 chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SONY)
88 chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET; 85 chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
@@ -92,7 +89,9 @@ static int ricoh_probe(struct sdhci_pci_chip *chip)
92 89
93static const struct sdhci_pci_fixes sdhci_ricoh = { 90static const struct sdhci_pci_fixes sdhci_ricoh = {
94 .probe = ricoh_probe, 91 .probe = ricoh_probe,
95 .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR, 92 .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
93 SDHCI_QUIRK_FORCE_DMA |
94 SDHCI_QUIRK_CLOCK_BEFORE_RESET,
96}; 95};
97 96
98static const struct sdhci_pci_fixes sdhci_ene_712 = { 97static const struct sdhci_pci_fixes sdhci_ene_712 = {
@@ -501,6 +500,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
501{ 500{
502 struct sdhci_pci_chip *chip; 501 struct sdhci_pci_chip *chip;
503 struct sdhci_pci_slot *slot; 502 struct sdhci_pci_slot *slot;
503 mmc_pm_flag_t pm_flags = 0;
504 int i, ret; 504 int i, ret;
505 505
506 chip = pci_get_drvdata(pdev); 506 chip = pci_get_drvdata(pdev);
@@ -519,6 +519,8 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
519 sdhci_resume_host(chip->slots[i]->host); 519 sdhci_resume_host(chip->slots[i]->host);
520 return ret; 520 return ret;
521 } 521 }
522
523 pm_flags |= slot->host->mmc->pm_flags;
522 } 524 }
523 525
524 if (chip->fixes && chip->fixes->suspend) { 526 if (chip->fixes && chip->fixes->suspend) {
@@ -531,9 +533,15 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
531 } 533 }
532 534
533 pci_save_state(pdev); 535 pci_save_state(pdev);
534 pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); 536 if (pm_flags & MMC_PM_KEEP_POWER) {
535 pci_disable_device(pdev); 537 if (pm_flags & MMC_PM_WAKE_SDIO_IRQ)
536 pci_set_power_state(pdev, pci_choose_state(pdev, state)); 538 pci_enable_wake(pdev, PCI_D3hot, 1);
539 pci_set_power_state(pdev, PCI_D3hot);
540 } else {
541 pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
542 pci_disable_device(pdev);
543 pci_set_power_state(pdev, pci_choose_state(pdev, state));
544 }
537 545
538 return 0; 546 return 0;
539} 547}
@@ -653,6 +661,8 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot(
653 goto unmap; 661 goto unmap;
654 } 662 }
655 663
664 host->mmc->pm_caps = MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ;
665
656 ret = sdhci_add_host(host); 666 ret = sdhci_add_host(host);
657 if (ret) 667 if (ret)
658 goto remove; 668 goto remove;