diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-04-26 17:00:42 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-04-26 17:00:42 +0200 |
commit | e1f9277c4a1851692508d4f1c89b7e2edeea5669 (patch) | |
tree | b9c509ea875f6d0863d84a257f673f0b6b4881c3 /drivers | |
parent | c3f2311e4b9e20785f870042ed6ddb3e55d43daf (diff) | |
parent | c3fbd67b94b0420f33210a8a02fc4c23ec2ea13b (diff) |
Merge branch 'acpica'
* acpica: (22 commits)
ACPICA: Update version to 20210331
ACPICA: IORT: Updates for revision E.b
ACPICA: acpisrc: Add missing conversion for VIOT support
ACPICA: iASL: Decode subtable type field for VIOT
ACPICA: iASL: Add support for CEDT table
ACPICA: ACPI 6.4: add support for PHAT table
ACPICA: ACPI 6.4: add CSI2Bus resource template
ACPICA: ACPI 6.4: PMTT: add new fields/structures
ACPICA: CXL 2.0: CEDT: Add new CEDT table
ACPICA: iASL: Add definitions for the VIOT table
ACPICA: ACPI 6.4: add SDEV secure access components
ACPICA: ACPI 6.4: Add new flags in SRAT
ACPICA: ACPI 6.4: HMAT: add new fields/flags
ACPICA: ACPI 6.4: NFIT: add Location Cookie field
ACPICA: Tree-wide: fix various typos and spelling mistakes
ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1
ACPICA: ACPI 6.4: PCCT: add support for subtable type 5
ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure
ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object
ACPICA: ACPI 6.4: add USB4 capabilities UUID
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/acpredef.h | 15 | ||||
-rw-r--r-- | drivers/acpi/acpica/acresrc.h | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/acutils.h | 1 | ||||
-rw-r--r-- | drivers/acpi/acpica/amlresrc.h | 19 | ||||
-rw-r--r-- | drivers/acpi/acpica/rscalc.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsdump.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsdumpinfo.c | 26 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsinfo.c | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/rslist.c | 9 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsmisc.c | 19 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsserial.c | 75 | ||||
-rw-r--r-- | drivers/acpi/acpica/utresdecode.c | 10 | ||||
-rw-r--r-- | drivers/acpi/acpica/utresrc.c | 1 | ||||
-rw-r--r-- | drivers/acpi/nfit/core.c | 2 |
14 files changed, 191 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h index 15cf904f0751..5951b433c304 100644 --- a/drivers/acpi/acpica/acpredef.h +++ b/drivers/acpi/acpica/acpredef.h @@ -328,6 +328,17 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { {{"_BMS", METHOD_1ARGS(ACPI_TYPE_INTEGER), METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, + {{"_BPC", METHOD_0ARGS, + METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */ + PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0), + + {{"_BPS", METHOD_0ARGS, + METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (5 Int) */ + PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0), + + {{"_BPT", METHOD_1ARGS(ACPI_TYPE_PACKAGE), + METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, + {{"_BQC", METHOD_0ARGS, METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, @@ -347,6 +358,10 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { {{"_CBA", METHOD_0ARGS, METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, /* See PCI firmware spec 3.0 */ + {{"_CBR", METHOD_0ARGS, + METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int) */ + PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0, 0, 0), + {{"_CCA", METHOD_0ARGS, METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, /* ACPI 5.1 */ diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h index 0cb975a3e01d..37c47e185fd4 100644 --- a/drivers/acpi/acpica/acresrc.h +++ b/drivers/acpi/acpica/acresrc.h @@ -46,6 +46,7 @@ typedef enum { ACPI_RSC_1BITFLAG, ACPI_RSC_2BITFLAG, ACPI_RSC_3BITFLAG, + ACPI_RSC_6BITFLAG, ACPI_RSC_ADDRESS, ACPI_RSC_BITMASK, ACPI_RSC_BITMASK16, @@ -102,6 +103,7 @@ typedef enum { ACPI_RSD_1BITFLAG, ACPI_RSD_2BITFLAG, ACPI_RSD_3BITFLAG, + ACPI_RSD_6BITFLAG, ACPI_RSD_ADDRESS, ACPI_RSD_DWORDLIST, ACPI_RSD_LITERAL, @@ -295,6 +297,7 @@ extern struct acpi_rsconvert_info acpi_rs_convert_address64[]; extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[]; extern struct acpi_rsconvert_info acpi_rs_convert_gpio[]; extern struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[]; +extern struct acpi_rsconvert_info acpi_rs_convert_csi2_serial_bus[]; extern struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[]; extern struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[]; extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[]; @@ -349,6 +352,7 @@ extern struct acpi_rsdump_info acpi_rs_dump_gpio[]; extern struct acpi_rsdump_info acpi_rs_dump_pin_function[]; extern struct acpi_rsdump_info acpi_rs_dump_fixed_dma[]; extern struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[]; +extern struct acpi_rsdump_info acpi_rs_dump_csi2_serial_bus[]; extern struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[]; extern struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[]; extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[]; diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index be6de7149e67..bccae0d3db75 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -28,6 +28,7 @@ extern const char *acpi_gbl_max_decode[]; extern const char *acpi_gbl_mem_decode[]; extern const char *acpi_gbl_min_decode[]; extern const char *acpi_gbl_mtp_decode[]; +extern const char *acpi_gbl_phy_decode[]; extern const char *acpi_gbl_rng_decode[]; extern const char *acpi_gbl_rw_decode[]; extern const char *acpi_gbl_shr_decode[]; diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index a9d91a3c2994..b98123210281 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h @@ -40,6 +40,7 @@ #define ACPI_RESTAG_IORESTRICTION "_IOR" #define ACPI_RESTAG_LENGTH "_LEN" #define ACPI_RESTAG_LINE "_LIN" +#define ACPI_RESTAG_LOCALPORT "_PRT" #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ #define ACPI_RESTAG_MAXADDR "_MAX" @@ -49,6 +50,7 @@ #define ACPI_RESTAG_MODE "_MOD" #define ACPI_RESTAG_PARITY "_PAR" #define ACPI_RESTAG_PHASE "_PHA" +#define ACPI_RESTAG_PHYTYPE "_PHY" #define ACPI_RESTAG_PIN "_PIN" #define ACPI_RESTAG_PINCONFIG "_PPI" #define ACPI_RESTAG_PINCONFIG_TYPE "_TYP" @@ -316,12 +318,26 @@ struct aml_resource_gpio { #define AML_RESOURCE_I2C_SERIALBUSTYPE 1 #define AML_RESOURCE_SPI_SERIALBUSTYPE 2 #define AML_RESOURCE_UART_SERIALBUSTYPE 3 -#define AML_RESOURCE_MAX_SERIALBUSTYPE 3 +#define AML_RESOURCE_CSI2_SERIALBUSTYPE 4 +#define AML_RESOURCE_MAX_SERIALBUSTYPE 4 #define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */ struct aml_resource_common_serialbus { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON}; +struct aml_resource_csi2_serialbus { + AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON + /* + * Optional fields follow immediately: + * 1) Vendor Data bytes + * 2) Resource Source String + */ +}; + +#define AML_RESOURCE_CSI2_REVISION 1 /* ACPI 6.4 */ +#define AML_RESOURCE_CSI2_TYPE_REVISION 1 /* ACPI 6.4 */ +#define AML_RESOURCE_CSI2_MIN_DATA_LEN 0 /* ACPI 6.4 */ + struct aml_resource_i2c_serialbus { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON u32 connection_speed; @@ -510,6 +526,7 @@ union aml_resource { struct aml_resource_i2c_serialbus i2c_serial_bus; struct aml_resource_spi_serialbus spi_serial_bus; struct aml_resource_uart_serialbus uart_serial_bus; + struct aml_resource_csi2_serialbus csi2_serial_bus; struct aml_resource_common_serialbus common_serial_bus; struct aml_resource_pin_function pin_function; struct aml_resource_pin_config pin_config; diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c index fcf129d27baa..90583db459a2 100644 --- a/drivers/acpi/acpica/rscalc.c +++ b/drivers/acpi/acpica/rscalc.c @@ -677,10 +677,10 @@ acpi_rs_get_list_length(u8 *aml_buffer, *size_needed += buffer_size; ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, - "Type %.2X, AmlLength %.2X InternalLength %.2X\n", + "Type %.2X, AmlLength %.2X InternalLength %.2X%8X\n", acpi_ut_get_resource_type(aml_buffer), acpi_ut_get_descriptor_length(aml_buffer), - buffer_size)); + ACPI_FORMAT_UINT64(*size_needed))); /* * Point to the next resource within the AML stream using the length diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c index 6601e71b45e3..611bc71c193f 100644 --- a/drivers/acpi/acpica/rsdump.c +++ b/drivers/acpi/acpica/rsdump.c @@ -87,6 +87,9 @@ void acpi_rs_dump_resource_list(struct acpi_resource *resource_list) ("Invalid descriptor type (%X) in resource list\n", resource_list->type); return; + } else if (!resource_list->type) { + ACPI_ERROR((AE_INFO, "Invalid Zero Resource Type")); + return; } /* Sanity check the length. It must not be zero, or we loop forever */ @@ -258,6 +261,11 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) table->pointer[*target & 0x07]); break; + case ACPI_RSD_6BITFLAG: + + acpi_rs_out_integer8(name, (ACPI_GET8(target) & 0x3F)); + break; + case ACPI_RSD_SHORTLIST: /* * Short byte list (single line output) for DMA and IRQ resources diff --git a/drivers/acpi/acpica/rsdumpinfo.c b/drivers/acpi/acpica/rsdumpinfo.c index cafa8134b4c6..b8b37449011b 100644 --- a/drivers/acpi/acpica/rsdumpinfo.c +++ b/drivers/acpi/acpica/rsdumpinfo.c @@ -421,6 +421,32 @@ struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[11] = { ACPI_RS_DUMP_COMMON_SERIAL_BUS }; +struct acpi_rsdump_info acpi_rs_dump_csi2_serial_bus[11] = { + { ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_csi2_serial_bus), + "Camera Serial Bus", NULL }, + { ACPI_RSD_UINT8, ACPI_RSD_OFFSET(csi2_serial_bus.revision_id), + "RevisionId", NULL }, + { ACPI_RSD_UINT8, ACPI_RSD_OFFSET(csi2_serial_bus.type), "Type", + acpi_gbl_sbt_decode }, + { ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(csi2_serial_bus.producer_consumer), + "ProducerConsumer", acpi_gbl_consume_decode }, + { ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(csi2_serial_bus.slave_mode), + "SlaveMode", acpi_gbl_sm_decode }, + { ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(csi2_serial_bus.phy_type), + "PhyType", acpi_gbl_phy_decode }, + { ACPI_RSD_6BITFLAG, + ACPI_RSD_OFFSET(csi2_serial_bus.local_port_instance), + "LocalPortInstance", NULL }, + { ACPI_RSD_UINT8, ACPI_RSD_OFFSET(csi2_serial_bus.type_revision_id), + "TypeRevisionId", NULL }, + { ACPI_RSD_UINT16, ACPI_RSD_OFFSET(csi2_serial_bus.vendor_length), + "VendorLength", NULL }, + { ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(csi2_serial_bus.vendor_data), + "VendorData", NULL }, + { ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(csi2_serial_bus.resource_source), + "ResourceSource", NULL }, +}; + struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[14] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus), "I2C Serial Bus", NULL}, diff --git a/drivers/acpi/acpica/rsinfo.c b/drivers/acpi/acpica/rsinfo.c index 6e2e596902eb..eaeb7ab58c2a 100644 --- a/drivers/acpi/acpica/rsinfo.c +++ b/drivers/acpi/acpica/rsinfo.c @@ -96,13 +96,14 @@ struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = { acpi_rs_convert_pin_group_config, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ }; -/* Subtype table for serial_bus -- I2C, SPI, and UART */ +/* Subtype table for serial_bus -- I2C, SPI, UART, and CSI2 */ struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = { NULL, acpi_rs_convert_i2c_serial_bus, acpi_rs_convert_spi_serial_bus, acpi_rs_convert_uart_serial_bus, + acpi_rs_convert_csi2_serial_bus }; #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) @@ -142,6 +143,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = { acpi_rs_dump_i2c_serial_bus, /* AML_RESOURCE_I2C_BUS_TYPE */ acpi_rs_dump_spi_serial_bus, /* AML_RESOURCE_SPI_BUS_TYPE */ acpi_rs_dump_uart_serial_bus, /* AML_RESOURCE_UART_BUS_TYPE */ + acpi_rs_dump_csi2_serial_bus, /* AML_RESOURCE_CSI2_BUS_TYPE */ }; #endif @@ -226,6 +228,7 @@ const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = { sizeof(struct aml_resource_i2c_serialbus), sizeof(struct aml_resource_spi_serialbus), sizeof(struct aml_resource_uart_serialbus), + sizeof(struct aml_resource_csi2_serialbus), }; const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = { @@ -233,4 +236,5 @@ const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = { ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus), ACPI_RS_SIZE(struct acpi_resource_spi_serialbus), ACPI_RS_SIZE(struct acpi_resource_uart_serialbus), + ACPI_RS_SIZE(struct acpi_resource_csi2_serialbus), }; diff --git a/drivers/acpi/acpica/rslist.c b/drivers/acpi/acpica/rslist.c index 0307675d37be..e46efaa889cd 100644 --- a/drivers/acpi/acpica/rslist.c +++ b/drivers/acpi/acpica/rslist.c @@ -59,7 +59,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml, AML_RESOURCE_MAX_SERIALBUSTYPE) { conversion_table = NULL; } else { - /* This is an I2C, SPI, or UART serial_bus descriptor */ + /* This is an I2C, SPI, UART, or CSI2 serial_bus descriptor */ conversion_table = acpi_gbl_convert_resource_serial_bus_dispatch @@ -89,6 +89,11 @@ acpi_rs_convert_aml_to_resources(u8 * aml, return_ACPI_STATUS(status); } + if (!resource->length) { + ACPI_EXCEPTION((AE_INFO, status, + "Zero-length resource returned from RsConvertAmlToResource")); + } + ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, "Type %.2X, AmlLength %.2X InternalLength %.2X\n", acpi_ut_get_resource_type(aml), length, @@ -158,7 +163,7 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, AML_RESOURCE_MAX_SERIALBUSTYPE) { conversion_table = NULL; } else { - /* This is an I2C, SPI, or UART serial_bus descriptor */ + /* This is an I2C, SPI, UART or CSI2 serial_bus descriptor */ conversion_table = acpi_gbl_convert_resource_serial_bus_dispatch 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); diff --git a/drivers/acpi/acpica/rsserial.c b/drivers/acpi/acpica/rsserial.c index 1b937d88980f..f9267956535c 100644 --- a/drivers/acpi/acpica/rsserial.c +++ b/drivers/acpi/acpica/rsserial.c @@ -187,6 +187,81 @@ struct acpi_rsconvert_info acpi_rs_convert_pin_function[13] = { /******************************************************************************* * + * acpi_rs_convert_csi2_serial_bus + * + ******************************************************************************/ + +struct acpi_rsconvert_info acpi_rs_convert_csi2_serial_bus[14] = { + { ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, + ACPI_RS_SIZE(struct acpi_resource_csi2_serialbus), + ACPI_RSC_TABLE_SIZE(acpi_rs_convert_csi2_serial_bus) }, + + { ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, + sizeof(struct aml_resource_csi2_serialbus), + 0 }, + + { ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.revision_id), + AML_OFFSET(common_serial_bus.revision_id), + 1 }, + + { ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.csi2_serial_bus.type), + AML_OFFSET(csi2_serial_bus.type), + 1 }, + + { ACPI_RSC_1BITFLAG, + ACPI_RS_OFFSET(data.csi2_serial_bus.producer_consumer), + AML_OFFSET(csi2_serial_bus.flags), + 1 }, + + { ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.csi2_serial_bus.slave_mode), + AML_OFFSET(csi2_serial_bus.flags), + 0 }, + + { ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.csi2_serial_bus.phy_type), + AML_OFFSET(csi2_serial_bus.type_specific_flags), + 0 }, + + { ACPI_RSC_6BITFLAG, + ACPI_RS_OFFSET(data.csi2_serial_bus.local_port_instance), + AML_OFFSET(csi2_serial_bus.type_specific_flags), + 2 }, + + { ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.csi2_serial_bus.type_revision_id), + AML_OFFSET(csi2_serial_bus.type_revision_id), + 1 }, + + /* Vendor data */ + + { ACPI_RSC_COUNT_SERIAL_VEN, + ACPI_RS_OFFSET(data.csi2_serial_bus.vendor_length), + AML_OFFSET(csi2_serial_bus.type_data_length), + AML_RESOURCE_CSI2_MIN_DATA_LEN }, + + { ACPI_RSC_MOVE_SERIAL_VEN, + ACPI_RS_OFFSET(data.csi2_serial_bus.vendor_data), + 0, + sizeof(struct aml_resource_csi2_serialbus) }, + + /* Resource Source */ + + { ACPI_RSC_MOVE8, + ACPI_RS_OFFSET(data.csi2_serial_bus.resource_source.index), + AML_OFFSET(csi2_serial_bus.res_source_index), + 1 }, + + { ACPI_RSC_COUNT_SERIAL_RES, + ACPI_RS_OFFSET(data.csi2_serial_bus.resource_source.string_length), + AML_OFFSET(csi2_serial_bus.type_data_length), + sizeof(struct aml_resource_csi2_serialbus) }, + + { ACPI_RSC_MOVE_SERIAL_RES, + ACPI_RS_OFFSET(data.csi2_serial_bus.resource_source.string_ptr), + AML_OFFSET(csi2_serial_bus.type_data_length), + sizeof(struct aml_resource_csi2_serialbus) }, +}; + +/******************************************************************************* + * * acpi_rs_convert_i2c_serial_bus * ******************************************************************************/ diff --git a/drivers/acpi/acpica/utresdecode.c b/drivers/acpi/acpica/utresdecode.c index 0a9c337346e8..85730fcd7d00 100644 --- a/drivers/acpi/acpica/utresdecode.c +++ b/drivers/acpi/acpica/utresdecode.c @@ -82,6 +82,13 @@ const char *acpi_gbl_mtp_decode[] = { "AddressRangeNVS" }; +const char *acpi_gbl_phy_decode[] = { + "Type C", + "Type D", + "Unknown Type", + "Unknown Type" +}; + const char *acpi_gbl_rng_decode[] = { "InvalidRanges", "NonISAOnlyRanges", @@ -161,7 +168,8 @@ const char *acpi_gbl_sbt_decode[] = { "/* UNKNOWN serial bus type */", "I2C", "SPI", - "UART" + "UART", + "CSI2" }; /* I2C serial bus access mode */ diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index cba5505171da..16f9a7035b39 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c @@ -64,6 +64,7 @@ const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = { ACPI_AML_SIZE_LARGE(struct aml_resource_i2c_serialbus), ACPI_AML_SIZE_LARGE(struct aml_resource_spi_serialbus), ACPI_AML_SIZE_LARGE(struct aml_resource_uart_serialbus), + ACPI_AML_SIZE_LARGE(struct aml_resource_csi2_serialbus), }; /* diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 8c5dde628405..09b05f720b25 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -3831,7 +3831,7 @@ static __init int nfit_init(void) int ret; BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40); - BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 56); + BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 64); BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48); BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 20); BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 9); |