提交 137c7835 编写于 作者: B Bob Moore 提交者: Rafael J. Wysocki

ACPICA: Resources: Allow _DMA method in walk resources

ACPICA commit af661c00afac7aa481a961fa48c6540a99ad64a6

The _DMA object contains a resource template, this change
adds support for the walk resources function so that ACPI
devices containing a _DMA object can actually parse it to
detect DMA ranges for the respective bus.

Link: https://github.com/acpica/acpica/commit/af661c00Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 376a588c
...@@ -615,7 +615,7 @@ ACPI_EXPORT_SYMBOL(acpi_walk_resource_buffer) ...@@ -615,7 +615,7 @@ ACPI_EXPORT_SYMBOL(acpi_walk_resource_buffer)
* 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, METHOD_NAME__PRS, or * (METHOD_NAME__CRS, METHOD_NAME__PRS, or
* METHOD_NAME__AEI) * METHOD_NAME__AEI or METHOD_NAME__DMA)
* user_function - Called for each resource * user_function - Called for each resource
* context - Passed to user_function * context - Passed to user_function
* *
...@@ -641,11 +641,12 @@ acpi_walk_resources(acpi_handle device_handle, ...@@ -641,11 +641,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))) { !ACPI_COMPARE_NAME(name, METHOD_NAME__AEI) &&
!ACPI_COMPARE_NAME(name, METHOD_NAME__DMA))) {
return_ACPI_STATUS(AE_BAD_PARAMETER); return_ACPI_STATUS(AE_BAD_PARAMETER);
} }
/* Get the _CRS/_PRS/_AEI resource list */ /* Get the _CRS/_PRS/_AEI/_DMA 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);
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#define METHOD_NAME__CLS "_CLS" #define METHOD_NAME__CLS "_CLS"
#define METHOD_NAME__CRS "_CRS" #define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__DDN "_DDN" #define METHOD_NAME__DDN "_DDN"
#define METHOD_NAME__DMA "_DMA"
#define METHOD_NAME__HID "_HID" #define METHOD_NAME__HID "_HID"
#define METHOD_NAME__INI "_INI" #define METHOD_NAME__INI "_INI"
#define METHOD_NAME__PLD "_PLD" #define METHOD_NAME__PLD "_PLD"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册