diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-pci.c')
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 55746bac2f44..3d9c2460d437 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -149,11 +149,11 @@ static const struct sdhci_pci_fixes sdhci_cafe = { | |||
149 | * ADMA operation is disabled for Moorestown platform due to | 149 | * ADMA operation is disabled for Moorestown platform due to |
150 | * hardware bugs. | 150 | * hardware bugs. |
151 | */ | 151 | */ |
152 | static int mrst_hc1_probe(struct sdhci_pci_chip *chip) | 152 | static int mrst_hc_probe(struct sdhci_pci_chip *chip) |
153 | { | 153 | { |
154 | /* | 154 | /* |
155 | * slots number is fixed here for MRST as SDIO3 is never used and has | 155 | * slots number is fixed here for MRST as SDIO3/5 are never used and |
156 | * hardware bugs. | 156 | * have hardware bugs. |
157 | */ | 157 | */ |
158 | chip->num_slots = 1; | 158 | chip->num_slots = 1; |
159 | return 0; | 159 | return 0; |
@@ -163,9 +163,9 @@ static const struct sdhci_pci_fixes sdhci_intel_mrst_hc0 = { | |||
163 | .quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_NO_HISPD_BIT, | 163 | .quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_NO_HISPD_BIT, |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static const struct sdhci_pci_fixes sdhci_intel_mrst_hc1 = { | 166 | static const struct sdhci_pci_fixes sdhci_intel_mrst_hc1_hc2 = { |
167 | .quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_NO_HISPD_BIT, | 167 | .quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_NO_HISPD_BIT, |
168 | .probe = mrst_hc1_probe, | 168 | .probe = mrst_hc_probe, |
169 | }; | 169 | }; |
170 | 170 | ||
171 | static const struct sdhci_pci_fixes sdhci_intel_mfd_sd = { | 171 | static const struct sdhci_pci_fixes sdhci_intel_mfd_sd = { |
@@ -538,7 +538,15 @@ static const struct pci_device_id pci_ids[] __devinitdata = { | |||
538 | .device = PCI_DEVICE_ID_INTEL_MRST_SD1, | 538 | .device = PCI_DEVICE_ID_INTEL_MRST_SD1, |
539 | .subvendor = PCI_ANY_ID, | 539 | .subvendor = PCI_ANY_ID, |
540 | .subdevice = PCI_ANY_ID, | 540 | .subdevice = PCI_ANY_ID, |
541 | .driver_data = (kernel_ulong_t)&sdhci_intel_mrst_hc1, | 541 | .driver_data = (kernel_ulong_t)&sdhci_intel_mrst_hc1_hc2, |
542 | }, | ||
543 | |||
544 | { | ||
545 | .vendor = PCI_VENDOR_ID_INTEL, | ||
546 | .device = PCI_DEVICE_ID_INTEL_MRST_SD2, | ||
547 | .subvendor = PCI_ANY_ID, | ||
548 | .subdevice = PCI_ANY_ID, | ||
549 | .driver_data = (kernel_ulong_t)&sdhci_intel_mrst_hc1_hc2, | ||
542 | }, | 550 | }, |
543 | 551 | ||
544 | { | 552 | { |
@@ -637,6 +645,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
637 | { | 645 | { |
638 | struct sdhci_pci_chip *chip; | 646 | struct sdhci_pci_chip *chip; |
639 | struct sdhci_pci_slot *slot; | 647 | struct sdhci_pci_slot *slot; |
648 | mmc_pm_flag_t slot_pm_flags; | ||
640 | mmc_pm_flag_t pm_flags = 0; | 649 | mmc_pm_flag_t pm_flags = 0; |
641 | int i, ret; | 650 | int i, ret; |
642 | 651 | ||
@@ -657,7 +666,11 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
657 | return ret; | 666 | return ret; |
658 | } | 667 | } |
659 | 668 | ||
660 | pm_flags |= slot->host->mmc->pm_flags; | 669 | slot_pm_flags = slot->host->mmc->pm_flags; |
670 | if (slot_pm_flags & MMC_PM_WAKE_SDIO_IRQ) | ||
671 | sdhci_enable_irq_wakeups(slot->host); | ||
672 | |||
673 | pm_flags |= slot_pm_flags; | ||
661 | } | 674 | } |
662 | 675 | ||
663 | if (chip->fixes && chip->fixes->suspend) { | 676 | if (chip->fixes && chip->fixes->suspend) { |
@@ -671,8 +684,10 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
671 | 684 | ||
672 | pci_save_state(pdev); | 685 | pci_save_state(pdev); |
673 | if (pm_flags & MMC_PM_KEEP_POWER) { | 686 | if (pm_flags & MMC_PM_KEEP_POWER) { |
674 | if (pm_flags & MMC_PM_WAKE_SDIO_IRQ) | 687 | if (pm_flags & MMC_PM_WAKE_SDIO_IRQ) { |
688 | pci_pme_active(pdev, true); | ||
675 | pci_enable_wake(pdev, PCI_D3hot, 1); | 689 | pci_enable_wake(pdev, PCI_D3hot, 1); |
690 | } | ||
676 | pci_set_power_state(pdev, PCI_D3hot); | 691 | pci_set_power_state(pdev, PCI_D3hot); |
677 | } else { | 692 | } else { |
678 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); | 693 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); |