diff options
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 81 |
1 files changed, 37 insertions, 44 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index a5db4aeefa36..e2e52cf53224 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -294,58 +294,51 @@ void __init acpi_nvs_nosave_s3(void); | |||
294 | #endif /* CONFIG_PM_SLEEP */ | 294 | #endif /* CONFIG_PM_SLEEP */ |
295 | 295 | ||
296 | struct acpi_osc_context { | 296 | struct acpi_osc_context { |
297 | char *uuid_str; /* uuid string */ | 297 | char *uuid_str; /* UUID string */ |
298 | int rev; | 298 | int rev; |
299 | struct acpi_buffer cap; /* arg2/arg3 */ | 299 | struct acpi_buffer cap; /* list of DWORD capabilities */ |
300 | struct acpi_buffer ret; /* free by caller if success */ | 300 | struct acpi_buffer ret; /* free by caller if success */ |
301 | }; | 301 | }; |
302 | 302 | ||
303 | #define OSC_QUERY_TYPE 0 | ||
304 | #define OSC_SUPPORT_TYPE 1 | ||
305 | #define OSC_CONTROL_TYPE 2 | ||
306 | |||
307 | /* _OSC DW0 Definition */ | ||
308 | #define OSC_QUERY_ENABLE 1 | ||
309 | #define OSC_REQUEST_ERROR 2 | ||
310 | #define OSC_INVALID_UUID_ERROR 4 | ||
311 | #define OSC_INVALID_REVISION_ERROR 8 | ||
312 | #define OSC_CAPABILITIES_MASK_ERROR 16 | ||
313 | |||
314 | acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); | 303 | acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); |
315 | 304 | ||
316 | /* platform-wide _OSC bits */ | 305 | /* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */ |
317 | #define OSC_SB_PAD_SUPPORT 1 | 306 | #define OSC_QUERY_DWORD 0 /* DWORD 1 */ |
318 | #define OSC_SB_PPC_OST_SUPPORT 2 | 307 | #define OSC_SUPPORT_DWORD 1 /* DWORD 2 */ |
319 | #define OSC_SB_PR3_SUPPORT 4 | 308 | #define OSC_CONTROL_DWORD 2 /* DWORD 3 */ |
320 | #define OSC_SB_HOTPLUG_OST_SUPPORT 8 | 309 | |
321 | #define OSC_SB_APEI_SUPPORT 16 | 310 | /* _OSC Capabilities DWORD 1: Query/Control and Error Returns (generic) */ |
311 | #define OSC_QUERY_ENABLE 0x00000001 /* input */ | ||
312 | #define OSC_REQUEST_ERROR 0x00000002 /* return */ | ||
313 | #define OSC_INVALID_UUID_ERROR 0x00000004 /* return */ | ||
314 | #define OSC_INVALID_REVISION_ERROR 0x00000008 /* return */ | ||
315 | #define OSC_CAPABILITIES_MASK_ERROR 0x00000010 /* return */ | ||
316 | |||
317 | /* Platform-Wide Capabilities _OSC: Capabilities DWORD 2: Support Field */ | ||
318 | #define OSC_SB_PAD_SUPPORT 0x00000001 | ||
319 | #define OSC_SB_PPC_OST_SUPPORT 0x00000002 | ||
320 | #define OSC_SB_PR3_SUPPORT 0x00000004 | ||
321 | #define OSC_SB_HOTPLUG_OST_SUPPORT 0x00000008 | ||
322 | #define OSC_SB_APEI_SUPPORT 0x00000010 | ||
323 | #define OSC_SB_CPC_SUPPORT 0x00000020 | ||
322 | 324 | ||
323 | extern bool osc_sb_apei_support_acked; | 325 | extern bool osc_sb_apei_support_acked; |
324 | 326 | ||
325 | /* PCI defined _OSC bits */ | 327 | /* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */ |
326 | /* _OSC DW1 Definition (OS Support Fields) */ | 328 | #define OSC_PCI_EXT_CONFIG_SUPPORT 0x00000001 |
327 | #define OSC_EXT_PCI_CONFIG_SUPPORT 1 | 329 | #define OSC_PCI_ASPM_SUPPORT 0x00000002 |
328 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 | 330 | #define OSC_PCI_CLOCK_PM_SUPPORT 0x00000004 |
329 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 | 331 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 0x00000008 |
330 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 | 332 | #define OSC_PCI_MSI_SUPPORT 0x00000010 |
331 | #define OSC_MSI_SUPPORT 16 | 333 | #define OSC_PCI_SUPPORT_MASKS 0x0000001f |
332 | #define OSC_PCI_SUPPORT_MASKS 0x1f | 334 | |
333 | 335 | /* PCI Host Bridge _OSC: Capabilities DWORD 3: Control Field */ | |
334 | /* _OSC DW1 Definition (OS Control Fields) */ | 336 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 0x00000001 |
335 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 | 337 | #define OSC_PCI_SHPC_NATIVE_HP_CONTROL 0x00000002 |
336 | #define OSC_SHPC_NATIVE_HP_CONTROL 2 | 338 | #define OSC_PCI_EXPRESS_PME_CONTROL 0x00000004 |
337 | #define OSC_PCI_EXPRESS_PME_CONTROL 4 | 339 | #define OSC_PCI_EXPRESS_AER_CONTROL 0x00000008 |
338 | #define OSC_PCI_EXPRESS_AER_CONTROL 8 | 340 | #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010 |
339 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 | 341 | #define OSC_PCI_CONTROL_MASKS 0x0000001f |
340 | |||
341 | #define OSC_PCI_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
342 | OSC_SHPC_NATIVE_HP_CONTROL | \ | ||
343 | OSC_PCI_EXPRESS_PME_CONTROL | \ | ||
344 | OSC_PCI_EXPRESS_AER_CONTROL | \ | ||
345 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | ||
346 | |||
347 | #define OSC_PCI_NATIVE_HOTPLUG (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
348 | OSC_SHPC_NATIVE_HP_CONTROL) | ||
349 | 342 | ||
350 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | 343 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, |
351 | u32 *mask, u32 req); | 344 | u32 *mask, u32 req); |