aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/rsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/rsutils.c')
-rw-r--r--drivers/acpi/acpica/rsutils.c56
1 files changed, 55 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 231811e56939..433a375deb93 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2011, Intel Corp. 8 * Copyright (C) 2000 - 2012, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -144,6 +144,9 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
144 * since there are no alignment or endian issues 144 * since there are no alignment or endian issues
145 */ 145 */
146 case ACPI_RSC_MOVE8: 146 case ACPI_RSC_MOVE8:
147 case ACPI_RSC_MOVE_GPIO_RES:
148 case ACPI_RSC_MOVE_SERIAL_VEN:
149 case ACPI_RSC_MOVE_SERIAL_RES:
147 ACPI_MEMCPY(destination, source, item_count); 150 ACPI_MEMCPY(destination, source, item_count);
148 return; 151 return;
149 152
@@ -153,6 +156,7 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
153 * misaligned memory transfers 156 * misaligned memory transfers
154 */ 157 */
155 case ACPI_RSC_MOVE16: 158 case ACPI_RSC_MOVE16:
159 case ACPI_RSC_MOVE_GPIO_PIN:
156 ACPI_MOVE_16_TO_16(&ACPI_CAST_PTR(u16, destination)[i], 160 ACPI_MOVE_16_TO_16(&ACPI_CAST_PTR(u16, destination)[i],
157 &ACPI_CAST_PTR(u16, source)[i]); 161 &ACPI_CAST_PTR(u16, source)[i]);
158 break; 162 break;
@@ -590,6 +594,56 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node,
590 594
591/******************************************************************************* 595/*******************************************************************************
592 * 596 *
597 * FUNCTION: acpi_rs_get_aei_method_data
598 *
599 * PARAMETERS: Node - Device node
600 * ret_buffer - Pointer to a buffer structure for the
601 * results
602 *
603 * RETURN: Status
604 *
605 * DESCRIPTION: This function is called to get the _AEI value of an object
606 * contained in an object specified by the handle passed in
607 *
608 * If the function fails an appropriate status will be returned
609 * and the contents of the callers buffer is undefined.
610 *
611 ******************************************************************************/
612
613acpi_status
614acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,
615 struct acpi_buffer *ret_buffer)
616{
617 union acpi_operand_object *obj_desc;
618 acpi_status status;
619
620 ACPI_FUNCTION_TRACE(rs_get_aei_method_data);
621
622 /* Parameters guaranteed valid by caller */
623
624 /* Execute the method, no parameters */
625
626 status = acpi_ut_evaluate_object(node, METHOD_NAME__AEI,
627 ACPI_BTYPE_BUFFER, &obj_desc);
628 if (ACPI_FAILURE(status)) {
629 return_ACPI_STATUS(status);
630 }
631
632 /*
633 * Make the call to create a resource linked list from the
634 * byte stream buffer that comes back from the _CRS method
635 * execution.
636 */
637 status = acpi_rs_create_resource_list(obj_desc, ret_buffer);
638
639 /* On exit, we must delete the object returned by evaluate_object */
640
641 acpi_ut_remove_reference(obj_desc);
642 return_ACPI_STATUS(status);
643}
644
645/*******************************************************************************
646 *
593 * FUNCTION: acpi_rs_get_method_data 647 * FUNCTION: acpi_rs_get_method_data
594 * 648 *
595 * PARAMETERS: Handle - Handle to the containing object 649 * PARAMETERS: Handle - Handle to the containing object