ACPI: SPCR: Support Precise Baud Rate filed
PATCH v3 1/1 ACPI: SPCR: Support Precise Baud Rate filed
From: Chen Pei <[email protected]>
The Microsoft Serial Port Console Redirection (SPCR) specification revision 1.09 comprises additional field: Precise Baud Rate [1].
It is used to describe non-traditional baud rates (such as those used by high-speed UARTs).
It contains a specific non-zero baud rate which overrides the value of the Configured Baud Rate field. If this field is zero or not present, Configured Baud Rate is used.
--- drivers/acpi/spcr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/acpi/spcr.c +9 -1
@@ -146,7 +146,15 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) goto done; } -switch (table->baud_rate) { +/* +* SPCR 1.09 defines Precise Baud Rate Filed contains a specific +* non-zero baud rate which overrides the value of the Configured +* Baud Rate field. If this field is zero or not present, Configured +* Baud Rate is used. +*/ +if (table->precise_baudrate) + baud_rate = table->precise_baudrate; +else switch (table->baud_rate) {case 0 :/* * SPCR 1.04 defines 0 as a preconfigured state of UART.
Signature · 1 line
2.49.0
Quoted 32 lines · On Sat, Sep 13, 2025 at 9:08 AM <[email protected]> wrote:
From: Chen Pei <[email protected]>
The Microsoft Serial Port Console Redirection (SPCR) specification revision 1.09 comprises additional field: Precise Baud Rate [1].
It is used to describe non-traditional baud rates (such as those used by high-speed UARTs).
It contains a specific non-zero baud rate which overrides the value of the Configured Baud Rate field. If this field is zero or not present, Configured Baud Rate is used.
Signed-off-by Chen Pei <[email protected]>--- drivers/acpi/spcr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/acpi/spcr.c +3
-1@@ -146,7 +146,15 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) goto done; } -switch (table->baud_rate) { +/* +* SPCR 1.09 defines Precise Baud Rate Filed contains a specific +* non-zero baud rate which overrides the value of the Configured
drivers/acpi/spcr.c int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
Quoted 10 lines
drivers/acpi/spcr.c +6
-1+* Baud Rate field. If this field is zero or not present, Configured +* Baud Rate is used. +*/ +if (table->precise_baudrate) + baud_rate = table->precise_baudrate; +else switch (table->baud_rate) {case 0 :/* * SPCR 1.04 defines 0 as a preconfigured state of UART. --
Applied as 6.18 material, thanks!