diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-09-05 17:07:39 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-09-23 19:40:45 -0400 |
commit | 7dab9ef4f0823072a3c9afdb3b373c9f2f38848b (patch) | |
tree | d57293c7b2705bd34812c073a2919904c194d359 | |
parent | 335b15097d571007b125eb9fe4ef1f84e61bd31d (diff) |
PCI/ACPI: Name _OSC #defines more consistently
Make PCI Host Bridge _OSC #defines more consistent. No functional change.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/pci_root.c | 19 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpi_pcihp.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 2 | ||||
-rw-r--r-- | include/linux/acpi.h | 12 |
4 files changed, 17 insertions, 18 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 323afd7ccfbf..28dd55509789 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -49,10 +49,10 @@ static int acpi_pci_root_add(struct acpi_device *device, | |||
49 | const struct acpi_device_id *not_used); | 49 | const struct acpi_device_id *not_used); |
50 | static void acpi_pci_root_remove(struct acpi_device *device); | 50 | static void acpi_pci_root_remove(struct acpi_device *device); |
51 | 51 | ||
52 | #define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ | 52 | #define ACPI_PCIE_REQ_SUPPORT (OSC_PCI_EXT_CONFIG_SUPPORT \ |
53 | | OSC_ACTIVE_STATE_PWR_SUPPORT \ | 53 | | OSC_PCI_ASPM_SUPPORT \ |
54 | | OSC_CLOCK_PWR_CAPABILITY_SUPPORT \ | 54 | | OSC_PCI_CLOCK_PM_SUPPORT \ |
55 | | OSC_MSI_SUPPORT) | 55 | | OSC_PCI_MSI_SUPPORT) |
56 | 56 | ||
57 | static const struct acpi_device_id root_device_ids[] = { | 57 | static const struct acpi_device_id root_device_ids[] = { |
58 | {"PNP0A03", 0}, | 58 | {"PNP0A03", 0}, |
@@ -439,13 +439,12 @@ static int acpi_pci_root_add(struct acpi_device *device, | |||
439 | acpi_pci_osc_support(root, flags); | 439 | acpi_pci_osc_support(root, flags); |
440 | 440 | ||
441 | if (pci_ext_cfg_avail()) | 441 | if (pci_ext_cfg_avail()) |
442 | flags |= OSC_EXT_PCI_CONFIG_SUPPORT; | 442 | flags |= OSC_PCI_EXT_CONFIG_SUPPORT; |
443 | if (pcie_aspm_support_enabled()) { | 443 | if (pcie_aspm_support_enabled()) { |
444 | flags |= OSC_ACTIVE_STATE_PWR_SUPPORT | | 444 | flags |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT; |
445 | OSC_CLOCK_PWR_CAPABILITY_SUPPORT; | ||
446 | } | 445 | } |
447 | if (pci_msi_enabled()) | 446 | if (pci_msi_enabled()) |
448 | flags |= OSC_MSI_SUPPORT; | 447 | flags |= OSC_PCI_MSI_SUPPORT; |
449 | if (flags != base_flags) { | 448 | if (flags != base_flags) { |
450 | status = acpi_pci_osc_support(root, flags); | 449 | status = acpi_pci_osc_support(root, flags); |
451 | if (ACPI_FAILURE(status)) { | 450 | if (ACPI_FAILURE(status)) { |
@@ -458,7 +457,7 @@ static int acpi_pci_root_add(struct acpi_device *device, | |||
458 | 457 | ||
459 | if (!pcie_ports_disabled | 458 | if (!pcie_ports_disabled |
460 | && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) { | 459 | && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) { |
461 | flags = OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL | 460 | flags = OSC_PCI_EXPRESS_CAPABILITY_CONTROL |
462 | | OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | 461 | | OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |
463 | | OSC_PCI_EXPRESS_PME_CONTROL; | 462 | | OSC_PCI_EXPRESS_PME_CONTROL; |
464 | 463 | ||
@@ -474,7 +473,7 @@ static int acpi_pci_root_add(struct acpi_device *device, | |||
474 | "Requesting ACPI _OSC control (0x%02x)\n", flags); | 473 | "Requesting ACPI _OSC control (0x%02x)\n", flags); |
475 | 474 | ||
476 | status = acpi_pci_osc_control_set(handle, &flags, | 475 | status = acpi_pci_osc_control_set(handle, &flags, |
477 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL); | 476 | OSC_PCI_EXPRESS_CAPABILITY_CONTROL); |
478 | if (ACPI_SUCCESS(status)) { | 477 | if (ACPI_SUCCESS(status)) { |
479 | dev_info(&device->dev, | 478 | dev_info(&device->dev, |
480 | "ACPI _OSC control (0x%02x) granted\n", flags); | 479 | "ACPI _OSC control (0x%02x) granted\n", flags); |
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 2a47e82821da..f8140164ec0b 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -338,7 +338,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags) | |||
338 | acpi_handle chandle, handle; | 338 | acpi_handle chandle, handle; |
339 | struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL }; | 339 | struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL }; |
340 | 340 | ||
341 | flags &= OSC_SHPC_NATIVE_HP_CONTROL; | 341 | flags &= OSC_PCI_SHPC_NATIVE_HP_CONTROL; |
342 | if (!flags) { | 342 | if (!flags) { |
343 | err("Invalid flags %u specified!\n", flags); | 343 | err("Invalid flags %u specified!\n", flags); |
344 | return -EINVAL; | 344 | return -EINVAL; |
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index e260f207a90e..d876e4b3c6a9 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -191,7 +191,7 @@ static inline const char *slot_name(struct slot *slot) | |||
191 | #include <linux/pci-acpi.h> | 191 | #include <linux/pci-acpi.h> |
192 | static inline int get_hp_hw_control_from_firmware(struct pci_dev *dev) | 192 | static inline int get_hp_hw_control_from_firmware(struct pci_dev *dev) |
193 | { | 193 | { |
194 | u32 flags = OSC_SHPC_NATIVE_HP_CONTROL; | 194 | u32 flags = OSC_PCI_SHPC_NATIVE_HP_CONTROL; |
195 | return acpi_get_hp_hw_control_from_firmware(dev, flags); | 195 | return acpi_get_hp_hw_control_from_firmware(dev, flags); |
196 | } | 196 | } |
197 | #else | 197 | #else |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index bb4e7701b26b..e2e52cf53224 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -325,19 +325,19 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); | |||
325 | extern bool osc_sb_apei_support_acked; | 325 | extern bool osc_sb_apei_support_acked; |
326 | 326 | ||
327 | /* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */ | 327 | /* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */ |
328 | #define OSC_EXT_PCI_CONFIG_SUPPORT 0x00000001 | 328 | #define OSC_PCI_EXT_CONFIG_SUPPORT 0x00000001 |
329 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 0x00000002 | 329 | #define OSC_PCI_ASPM_SUPPORT 0x00000002 |
330 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 0x00000004 | 330 | #define OSC_PCI_CLOCK_PM_SUPPORT 0x00000004 |
331 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 0x00000008 | 331 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 0x00000008 |
332 | #define OSC_MSI_SUPPORT 0x00000010 | 332 | #define OSC_PCI_MSI_SUPPORT 0x00000010 |
333 | #define OSC_PCI_SUPPORT_MASKS 0x0000001f | 333 | #define OSC_PCI_SUPPORT_MASKS 0x0000001f |
334 | 334 | ||
335 | /* PCI Host Bridge _OSC: Capabilities DWORD 3: Control Field */ | 335 | /* PCI Host Bridge _OSC: Capabilities DWORD 3: Control Field */ |
336 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 0x00000001 | 336 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 0x00000001 |
337 | #define OSC_SHPC_NATIVE_HP_CONTROL 0x00000002 | 337 | #define OSC_PCI_SHPC_NATIVE_HP_CONTROL 0x00000002 |
338 | #define OSC_PCI_EXPRESS_PME_CONTROL 0x00000004 | 338 | #define OSC_PCI_EXPRESS_PME_CONTROL 0x00000004 |
339 | #define OSC_PCI_EXPRESS_AER_CONTROL 0x00000008 | 339 | #define OSC_PCI_EXPRESS_AER_CONTROL 0x00000008 |
340 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 0x00000010 | 340 | #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010 |
341 | #define OSC_PCI_CONTROL_MASKS 0x0000001f | 341 | #define OSC_PCI_CONTROL_MASKS 0x0000001f |
342 | 342 | ||
343 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | 343 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, |