diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2021-04-01 22:01:03 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2021-04-01 22:01:03 +0000 |
| commit | 1e02e5b0ba8634758c128dcb43c67342c7219cd4 (patch) | |
| tree | da0db69c306079644fef78169ad973ae80b86f85 /source/components/disassembler | |
| parent | a61ec1492c58c40bd0d968794c380668c157e2ef (diff) | |
Diffstat (limited to 'source/components/disassembler')
| -rw-r--r-- | source/components/disassembler/dmresrcl2.c | 90 |
1 files changed, 88 insertions, 2 deletions
diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c index e98a15dbe26a..ae15e3d8aa7f 100644 --- a/source/components/disassembler/dmresrcl2.c +++ b/source/components/disassembler/dmresrcl2.c @@ -160,6 +160,13 @@ /* Local prototypes */ static void +AcpiDmCsi2SerialBusDescriptor ( + ACPI_OP_WALK_INFO *Info, + AML_RESOURCE *Resource, + UINT32 Length, + UINT32 Level); + +static void AcpiDmI2cSerialBusDescriptor ( ACPI_OP_WALK_INFO *Info, AML_RESOURCE *Resource, @@ -200,7 +207,8 @@ static ACPI_RESOURCE_HANDLER SerialBusResourceDispatch [] = NULL, AcpiDmI2cSerialBusDescriptor, AcpiDmSpiSerialBusDescriptor, - AcpiDmUartSerialBusDescriptor + AcpiDmUartSerialBusDescriptor, + AcpiDmCsi2SerialBusDescriptor }; @@ -674,6 +682,15 @@ AcpiDmDumpSerialBusVendorData ( sizeof (AML_RESOURCE_UART_SERIALBUS)); break; + case AML_RESOURCE_CSI2_SERIALBUSTYPE: + + VendorLength = Resource->CommonSerialBus.TypeDataLength - + AML_RESOURCE_CSI2_MIN_DATA_LEN; + + VendorData = ACPI_ADD_PTR (UINT8, Resource, + sizeof (AML_RESOURCE_CSI2_SERIALBUS)); + break; + default: return; @@ -687,6 +704,75 @@ AcpiDmDumpSerialBusVendorData ( /******************************************************************************* * + * FUNCTION: AcpiDmCsi2SerialBusDescriptor + * + * PARAMETERS: Info - Extra resource info + * Resource - Pointer to the resource descriptor + * Length - Length of the descriptor in bytes + * Level - Current source code indentation level + * + * RETURN: None + * + * DESCRIPTION: Decode a CSI2 serial bus descriptor + * + ******************************************************************************/ + +static void +AcpiDmCsi2SerialBusDescriptor ( + ACPI_OP_WALK_INFO *Info, + AML_RESOURCE *Resource, + UINT32 Length, + UINT32 Level) +{ + UINT32 ResourceSourceOffset; + char *DeviceName; + + + /* SlaveMode, PhyType, LocalPortInstance */ + + AcpiDmIndent (Level); + AcpiOsPrintf ("Csi2Bus (%s,", + AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->Csi2SerialBus.Flags)]); + + AcpiOsPrintf (" 0x%2.2X, 0x%2.2X,\n", + Resource->Csi2SerialBus.TypeSpecificFlags & 0x03, + Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC); + + /* ResourceSource is a required field */ + + ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) + + Resource->CommonSerialBus.TypeDataLength; + + AcpiDmIndent (Level + 1); + DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); + AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); + + /* ResourceSourceIndex, ResourceUsage */ + + AcpiOsPrintf (",\n"); + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("0x%2.2X, ", Resource->Csi2SerialBus.ResSourceIndex); + + AcpiOsPrintf ("%s, ", + AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->Csi2SerialBus.Flags, 1)]); + + /* Insert a descriptor name */ + + AcpiDmDescriptorName (); + + /* Dump the vendor data */ + + AcpiOsPrintf (",\n"); + AcpiDmIndent (Level + 1); + AcpiDmDumpSerialBusVendorData (Resource, Level); + AcpiOsPrintf (")\n"); + + MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmI2cSerialBusDescriptor * * PARAMETERS: Info - Extra resource info @@ -939,7 +1025,7 @@ AcpiDmUartSerialBusDescriptor ( * * RETURN: None * - * DESCRIPTION: Decode a I2C/SPI/UART serial bus descriptor + * DESCRIPTION: Decode a I2C/SPI/UART/CSI2 serial bus descriptor * ******************************************************************************/ |
