Skip to content

Commit 4d330fe

Browse files
cp0613rafaeljw
authored andcommitted
ACPI: SPCR: Support Precise Baud Rate field
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. Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table [1] Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Link: https://patch.msgid.link/20250913070815.16758-1-cp0613@linux.alibaba.com [ rjw: Corrected typo in the subject ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent bf4206d commit 4d330fe

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/acpi/spcr.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,15 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
149149
goto done;
150150
}
151151

152-
switch (table->baud_rate) {
152+
/*
153+
* SPCR 1.09 defines Precise Baud Rate Filed contains a specific
154+
* non-zero baud rate which overrides the value of the Configured
155+
* Baud Rate field. If this field is zero or not present, Configured
156+
* Baud Rate is used.
157+
*/
158+
if (table->precise_baudrate)
159+
baud_rate = table->precise_baudrate;
160+
else switch (table->baud_rate) {
153161
case 0:
154162
/*
155163
* SPCR 1.04 defines 0 as a preconfigured state of UART.

0 commit comments

Comments
 (0)