diff options
author | Niyas Sait <niyas.sait@linaro.org> | 2023-01-31 10:18:48 +0000 |
---|---|---|
committer | Niyas Sait <niyas.sait@linaro.org> | 2023-02-08 11:20:04 +0000 |
commit | 661feab5ee01a34af95a389a18c82e79f1aba05a (patch) | |
tree | ea2c1f52e0e93b8d97851b3b94ccce4c2f434901 /source/components/resources | |
parent | 0c9616eed6ae88da6a968e8228254a4eb117a5c6 (diff) | |
download | acpica-661feab5ee01a34af95a389a18c82e79f1aba05a.tar.gz |
add support for ClockInput resource (v6.5)
Diffstat (limited to 'source/components/resources')
-rw-r--r-- | source/components/resources/rscalc.c | 13 | ||||
-rw-r--r-- | source/components/resources/rsdumpinfo.c | 11 | ||||
-rw-r--r-- | source/components/resources/rsinfo.c | 5 | ||||
-rw-r--r-- | source/components/resources/rsserial.c | 44 |
4 files changed, 73 insertions, 0 deletions
diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index a244ee32a..623364b10 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -480,6 +480,13 @@ AcpiRsGetAmlLength ( break; + case ACPI_RESOURCE_TYPE_CLOCK_INPUT: + + TotalSize = (ACPI_RS_LENGTH) (TotalSize + + Resource->Data.ClockInput.ResourceSource.StringLength); + + break; + case ACPI_RESOURCE_TYPE_SERIAL_BUS: @@ -789,6 +796,12 @@ AcpiRsGetListLength ( break; + case ACPI_RESOURCE_NAME_CLOCK_INPUT: + ExtraStructBytes = AcpiRsStreamOptionLength ( + ResourceLength, MinimumAmlResourceLength); + + break; + default: break; diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c index 42a5e33bb..f15b7b981 100644 --- a/source/components/resources/rsdumpinfo.c +++ b/source/components/resources/rsdumpinfo.c @@ -374,6 +374,17 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[10] = {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (PinFunction.VendorData), "VendorData", NULL}, }; +ACPI_RSDUMP_INFO AcpiRsDumpClockInput[7] = +{ + {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpClockInput), "ClockInput", NULL}, + {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (ClockInput.RevisionId), "RevisionId", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (ClockInput.FrequencyNumerator), "FrequencyNumerator", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (ClockInput.FrequencyDivisor), "FrequencyDivisor", NULL}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ClockInput.Scale), "Scale", AcpiGbl_ClockInputScale}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ClockInput.Mode), "Mode", AcpiGbl_ClockInputMode}, + {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (ClockInput.ResourceSource), "ResourceSource", NULL}, +}; + ACPI_RSDUMP_INFO AcpiRsDumpPinConfig[11] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinConfig), "PinConfig", NULL}, diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c index 976b7e7b3..551b647b7 100644 --- a/source/components/resources/rsinfo.c +++ b/source/components/resources/rsinfo.c @@ -197,6 +197,7 @@ ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[] = AcpiRsConvertPinGroup, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ AcpiRsConvertPinGroupFunction, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ AcpiRsConvertPinGroupConfig, /* 0x18, ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + AcpiRsConvertClockInput, /* 0x19, ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ @@ -243,6 +244,7 @@ ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[] = AcpiRsConvertPinGroup, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ AcpiRsConvertPinGroupFunction, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ AcpiRsConvertPinGroupConfig, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ + AcpiRsConvertClockInput, /* 0x13, ACPI_RESOURCE_NAME_CLOCK_INPUT */ }; /* Subtype table for SerialBus -- I2C, SPI, UART, and CSI2 */ @@ -288,6 +290,7 @@ ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[] = AcpiRsDumpPinGroup, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ AcpiRsDumpPinGroupFunction, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ AcpiRsDumpPinGroupConfig, /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + AcpiRsDumpClockInput, /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; ACPI_RSDUMP_INFO *AcpiGbl_DumpSerialBusDispatch[] = @@ -333,6 +336,7 @@ const UINT8 AcpiGbl_AmlResourceSizes[] = sizeof (AML_RESOURCE_PIN_GROUP), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ sizeof (AML_RESOURCE_PIN_GROUP_FUNCTION), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ sizeof (AML_RESOURCE_PIN_GROUP_CONFIG), /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + sizeof (AML_RESOURCE_CLOCK_INPUT), /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; @@ -378,6 +382,7 @@ const UINT8 AcpiGbl_ResourceStructSizes[] = ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP), ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_FUNCTION), ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_CONFIG), + ACPI_RS_SIZE (ACPI_RESOURCE_CLOCK_INPUT), }; const UINT8 AcpiGbl_AmlResourceSerialBusSizes[] = diff --git a/source/components/resources/rsserial.c b/source/components/resources/rsserial.c index 1b4b2180d..4c19f8908 100644 --- a/source/components/resources/rsserial.c +++ b/source/components/resources/rsserial.c @@ -256,6 +256,50 @@ ACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] = /******************************************************************************* * + * AcpiRsConvertClockInput + * + ******************************************************************************/ + +ACPI_RSCONVERT_INFO AcpiRsConvertClockInput[8] = +{ + {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_CLOCK_INPUT, + ACPI_RS_SIZE (ACPI_RESOURCE_CLOCK_INPUT), + ACPI_RSC_TABLE_SIZE (AcpiRsConvertClockInput)}, + + {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_CLOCK_INPUT, + sizeof (AML_RESOURCE_CLOCK_INPUT), + 0}, + + {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.ClockInput.RevisionId), + AML_OFFSET (ClockInput.RevisionId), + 1}, + + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ClockInput.Mode), + AML_OFFSET (ClockInput.Flags), + 0}, + + {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.ClockInput.Scale), + AML_OFFSET (ClockInput.Flags), + 1}, + + {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.ClockInput.FrequencyDivisor), + AML_OFFSET (ClockInput.FrequencyDivisor), + 2}, + + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.ClockInput.FrequencyNumerator), + AML_OFFSET (ClockInput.FrequencyNumerator), + 4}, + + /* Resource Source */ + {ACPI_RSC_SOURCE, ACPI_RS_OFFSET (Data.ClockInput.ResourceSource), + 0, + sizeof(AML_RESOURCE_CLOCK_INPUT)}, + +}; + + +/******************************************************************************* + * * AcpiRsConvertPinfunction * ******************************************************************************/ |