diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-23 13:59:43 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-23 13:59:43 -0400 |
commit | 35e7f73c32ad44a931d918d04e317a7fb0c63e6e (patch) | |
tree | e3cb8c89c8230aaa45a0f1b101decdc3b9831938 /include | |
parent | e5028b52e46eb1379d78d136bd0890705f331183 (diff) | |
parent | 448bd857d48e69b33ef323739dc6d8ca20d4cda7 (diff) |
Merge branch 'topic/huang-d3cold-v7' into next
* topic/huang-d3cold-v7:
PCI/PM: add PCIe runtime D3cold support
PCI: do not call pci_set_power_state with PCI_D3cold
PCI/PM: add runtime PM support to PCIe port
ACPI/PM: specify lowest allowed state for device sleep state
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acpi_bus.h | 6 | ||||
-rw-r--r-- | include/linux/pci.h | 16 |
2 files changed, 15 insertions, 7 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 457974073994..6a6c46e84ae3 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -415,13 +415,13 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | |||
415 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 415 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
416 | 416 | ||
417 | #ifdef CONFIG_PM | 417 | #ifdef CONFIG_PM |
418 | int acpi_pm_device_sleep_state(struct device *, int *); | 418 | int acpi_pm_device_sleep_state(struct device *, int *, int); |
419 | #else | 419 | #else |
420 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p) | 420 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) |
421 | { | 421 | { |
422 | if (p) | 422 | if (p) |
423 | *p = ACPI_STATE_D0; | 423 | *p = ACPI_STATE_D0; |
424 | return ACPI_STATE_D3; | 424 | return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; |
425 | } | 425 | } |
426 | #endif | 426 | #endif |
427 | 427 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index c739df91bac9..0769aa409085 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -132,9 +132,10 @@ static inline const char *pci_power_name(pci_power_t state) | |||
132 | return pci_power_names[1 + (int) state]; | 132 | return pci_power_names[1 + (int) state]; |
133 | } | 133 | } |
134 | 134 | ||
135 | #define PCI_PM_D2_DELAY 200 | 135 | #define PCI_PM_D2_DELAY 200 |
136 | #define PCI_PM_D3_WAIT 10 | 136 | #define PCI_PM_D3_WAIT 10 |
137 | #define PCI_PM_BUS_WAIT 50 | 137 | #define PCI_PM_D3COLD_WAIT 100 |
138 | #define PCI_PM_BUS_WAIT 50 | ||
138 | 139 | ||
139 | /** The pci_channel state describes connectivity between the CPU and | 140 | /** The pci_channel state describes connectivity between the CPU and |
140 | * the pci device. If some PCI bus between here and the pci device | 141 | * the pci device. If some PCI bus between here and the pci device |
@@ -278,11 +279,18 @@ struct pci_dev { | |||
278 | unsigned int pme_poll:1; /* Poll device's PME status bit */ | 279 | unsigned int pme_poll:1; /* Poll device's PME status bit */ |
279 | unsigned int d1_support:1; /* Low power state D1 is supported */ | 280 | unsigned int d1_support:1; /* Low power state D1 is supported */ |
280 | unsigned int d2_support:1; /* Low power state D2 is supported */ | 281 | unsigned int d2_support:1; /* Low power state D2 is supported */ |
281 | unsigned int no_d1d2:1; /* Only allow D0 and D3 */ | 282 | unsigned int no_d1d2:1; /* D1 and D2 are forbidden */ |
283 | unsigned int no_d3cold:1; /* D3cold is forbidden */ | ||
284 | unsigned int d3cold_allowed:1; /* D3cold is allowed by user */ | ||
282 | unsigned int mmio_always_on:1; /* disallow turning off io/mem | 285 | unsigned int mmio_always_on:1; /* disallow turning off io/mem |
283 | decoding during bar sizing */ | 286 | decoding during bar sizing */ |
284 | unsigned int wakeup_prepared:1; | 287 | unsigned int wakeup_prepared:1; |
288 | unsigned int runtime_d3cold:1; /* whether go through runtime | ||
289 | D3cold, not set for devices | ||
290 | powered on/off by the | ||
291 | corresponding bridge */ | ||
285 | unsigned int d3_delay; /* D3->D0 transition time in ms */ | 292 | unsigned int d3_delay; /* D3->D0 transition time in ms */ |
293 | unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */ | ||
286 | 294 | ||
287 | #ifdef CONFIG_PCIEASPM | 295 | #ifdef CONFIG_PCIEASPM |
288 | struct pcie_link_state *link_state; /* ASPM link state. */ | 296 | struct pcie_link_state *link_state; /* ASPM link state. */ |