Commit 25169b77 authored by Zhang Rui's avatar Zhang Rui Committed by Len Brown

ACPI 5.0: Allow _AEI method in walk resources

_AEI contains a resource template, this change adds support for
the walk resources function.
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 7fce7a4b
...@@ -526,8 +526,9 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) ...@@ -526,8 +526,9 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)
* *
* PARAMETERS: device_handle - Handle to the device object for the * PARAMETERS: device_handle - Handle to the device object for the
* device we are querying * device we are querying
* Name - Method name of the resources we want * Name - Method name of the resources we want.
* (METHOD_NAME__CRS or METHOD_NAME__PRS) * (METHOD_NAME__CRS, METHOD_NAME__PRS, or
* METHOD_NAME__AEI)
* user_function - Called for each resource * user_function - Called for each resource
* Context - Passed to user_function * Context - Passed to user_function
* *
...@@ -554,11 +555,12 @@ acpi_walk_resources(acpi_handle device_handle, ...@@ -554,11 +555,12 @@ acpi_walk_resources(acpi_handle device_handle,
if (!device_handle || !user_function || !name || if (!device_handle || !user_function || !name ||
(!ACPI_COMPARE_NAME(name, METHOD_NAME__CRS) && (!ACPI_COMPARE_NAME(name, METHOD_NAME__CRS) &&
!ACPI_COMPARE_NAME(name, METHOD_NAME__PRS))) { !ACPI_COMPARE_NAME(name, METHOD_NAME__PRS) &&
!ACPI_COMPARE_NAME(name, METHOD_NAME__AEI))) {
return_ACPI_STATUS(AE_BAD_PARAMETER); return_ACPI_STATUS(AE_BAD_PARAMETER);
} }
/* Get the _CRS or _PRS resource list */ /* Get the _CRS/_PRS/_AEI resource list */
buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
status = acpi_rs_get_method_data(device_handle, name, &buffer); status = acpi_rs_get_method_data(device_handle, name, &buffer);
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#define METHOD_NAME__PRT "_PRT" #define METHOD_NAME__PRT "_PRT"
#define METHOD_NAME__CRS "_CRS" #define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__PRS "_PRS" #define METHOD_NAME__PRS "_PRS"
#define METHOD_NAME__AEI "_AEI"
#define METHOD_NAME__PRW "_PRW" #define METHOD_NAME__PRW "_PRW"
#define METHOD_NAME__SRS "_SRS" #define METHOD_NAME__SRS "_SRS"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment