Lines Matching full:resource

25  * DESCRIPTION: Convert an AML resource to an internal representation of the
26 * resource that is aligned and easier to access.
36 struct acpi_resource *resource; in acpi_rs_convert_aml_to_resources() local
47 resource = *resource_ptr; in acpi_rs_convert_aml_to_resources()
48 if (ACPI_IS_MISALIGNED(resource)) { in acpi_rs_convert_aml_to_resources()
50 "Misaligned resource pointer %p", resource)); in acpi_rs_convert_aml_to_resources()
75 "Invalid/unsupported resource descriptor: Type 0x%2.2X", in acpi_rs_convert_aml_to_resources()
80 /* Convert the AML byte stream resource to a local resource struct */ in acpi_rs_convert_aml_to_resources()
83 acpi_rs_convert_aml_to_resource(resource, aml_resource, in acpi_rs_convert_aml_to_resources()
87 "Could not convert AML resource (Type 0x%X)", in acpi_rs_convert_aml_to_resources()
95 resource->length)); in acpi_rs_convert_aml_to_resources()
99 *resource_ptr = ACPI_NEXT_RESOURCE(resource); in acpi_rs_convert_aml_to_resources()
107 * PARAMETERS: resource - Pointer to the resource linked list
117 * DESCRIPTION: Takes the resource linked list and parses it, creating a
123 acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, in acpi_rs_convert_resources_to_aml() argument
133 /* Walk the resource descriptor list, convert each descriptor */ in acpi_rs_convert_resources_to_aml()
137 /* Validate the (internal) Resource Type */ in acpi_rs_convert_resources_to_aml()
139 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { in acpi_rs_convert_resources_to_aml()
141 "Invalid descriptor type (0x%X) in resource list", in acpi_rs_convert_resources_to_aml()
142 resource->type)); in acpi_rs_convert_resources_to_aml()
148 if (!resource->length) { in acpi_rs_convert_resources_to_aml()
150 "Invalid zero length descriptor in resource list\n")); in acpi_rs_convert_resources_to_aml()
156 if (resource->type == ACPI_RESOURCE_TYPE_SERIAL_BUS) { in acpi_rs_convert_resources_to_aml()
157 if (resource->data.common_serial_bus.type > in acpi_rs_convert_resources_to_aml()
165 [resource->data.common_serial_bus.type]; in acpi_rs_convert_resources_to_aml()
169 acpi_gbl_set_resource_dispatch[resource->type]; in acpi_rs_convert_resources_to_aml()
174 "Invalid/unsupported resource descriptor: Type 0x%2.2X", in acpi_rs_convert_resources_to_aml()
175 resource->type)); in acpi_rs_convert_resources_to_aml()
179 status = acpi_rs_convert_resource_to_aml(resource, in acpi_rs_convert_resources_to_aml()
186 "Could not convert resource (type 0x%X) to AML", in acpi_rs_convert_resources_to_aml()
187 resource->type)); in acpi_rs_convert_resources_to_aml()
191 /* Perform final sanity check on the new AML resource descriptor */ in acpi_rs_convert_resources_to_aml()
203 if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { in acpi_rs_convert_resources_to_aml()
205 /* An End Tag indicates the end of the input Resource Template */ in acpi_rs_convert_resources_to_aml()
212 * Aml to point to the next (output) resource descriptor in acpi_rs_convert_resources_to_aml()
216 /* Point to the next input resource descriptor */ in acpi_rs_convert_resources_to_aml()
218 resource = ACPI_NEXT_RESOURCE(resource); in acpi_rs_convert_resources_to_aml()
221 /* Completed buffer, but did not find an end_tag resource descriptor */ in acpi_rs_convert_resources_to_aml()