mmc: SDHCI: The driver should not put the device into a low-power state
authorChuanxiao Dong <chuanxiao.dong@intel.com>
Mon, 24 Oct 2011 05:59:20 +0000 (13:59 +0800)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 21:21:12 +0000 (13:21 -0800)
It is not required (in fact it even is not recommended) that a PCI driver's
suspend() callback save the standard configuration registers of the device,
prepare it for waking up the system, or put it into a low-power state.
All of these operations can very well be taken care of by the PCI subsystem,
without the driver's participation.

Change-Id: I69184088bda601739faf1436629805034c07241f
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23127
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
drivers/mmc/host/sdhci-pci.c

index 512bd82..2706cd3 100644 (file)
@@ -1115,19 +1115,6 @@ static int sdhci_pci_suspend(struct device *dev)
                }
        }
 
-       pci_save_state(pdev);
-       if (pm_flags & MMC_PM_KEEP_POWER) {
-               if (pm_flags & MMC_PM_WAKE_SDIO_IRQ) {
-                       pci_pme_active(pdev, true);
-                       pci_enable_wake(pdev, PCI_D3hot, 1);
-               }
-               pci_set_power_state(pdev, PCI_D3hot);
-       } else {
-               pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
-               pci_disable_device(pdev);
-               pci_set_power_state(pdev, pci_choose_state(pdev, state));
-       }
-
        return 0;
 }
 
@@ -1142,12 +1129,6 @@ static int sdhci_pci_resume(struct device *dev)
        if (!chip)
                return 0;
 
-       pci_set_power_state(pdev, PCI_D0);
-       pci_restore_state(pdev);
-       ret = pci_enable_device(pdev);
-       if (ret)
-               return ret;
-
        if (chip->fixes && chip->fixes->resume) {
                ret = chip->fixes->resume(chip);
                if (ret)