From a2befbb2c3fbeccf4a04e9f0179cc28d5f5c1682 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 6 Apr 2021 14:30:22 -0700 Subject: ACPICA: ACPI 6.4: add CSI2Bus resource template This commit the result of squashing the following: ACPICA commit 21a316fdaa46b3fb245a1920f3829cb05d6ced6e ACPICA commit f5506fc7dad08c2a25ef52cf836c2d67385a612c Link: https://github.com/acpica/acpica/commit/21a316fd Link: https://github.com/acpica/acpica/commit/f5506fc7 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/rsmisc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'drivers/acpi/acpica/rsmisc.c') diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c index 1763a3dbc9b1..c2dd9aae4745 100644 --- a/drivers/acpi/acpica/rsmisc.c +++ b/drivers/acpi/acpica/rsmisc.c @@ -70,6 +70,8 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, */ count = INIT_TABLE_LENGTH(info); while (count) { + target = NULL; + /* * Source is the external AML byte stream buffer, * destination is the internal resource descriptor @@ -120,6 +122,14 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, ((ACPI_GET8(source) >> info->value) & 0x07)); break; + case ACPI_RSC_6BITFLAG: + /* + * Mask and shift the flag bits + */ + ACPI_SET8(destination, + ((ACPI_GET8(source) >> info->value) & 0x3F)); + break; + case ACPI_RSC_COUNT: item_count = ACPI_GET8(source); @@ -509,6 +519,15 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, value)); break; + case ACPI_RSC_6BITFLAG: + /* + * Mask and shift the flag bits + */ + ACPI_SET_BIT(*ACPI_CAST8(destination), (u8) + ((ACPI_GET8(source) & 0x3F) << info-> + value)); + break; + case ACPI_RSC_COUNT: item_count = ACPI_GET8(source); -- cgit v1.2.3