summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorChen Pei <cp0613@linux.alibaba.com>2025-09-13 15:08:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-13 15:34:07 -0500
commitc9172cced19bf2a84f3563817076326e71e7cca3 (patch)
tree59c9d913848cba65fc3343b160e33f11e17b5343 /drivers/acpi
parentf25411c9d87bdc8a35eecfbac525a081677470ff (diff)
downloadlinux-c9172cced19bf2a84f3563817076326e71e7cca3.tar.gz
linux-c9172cced19bf2a84f3563817076326e71e7cca3.tar.bz2
linux-c9172cced19bf2a84f3563817076326e71e7cca3.zip
ACPI: SPCR: Support Precise Baud Rate field
[ Upstream commit 4d330fe54145ecfbb657ac01a554fdedf3c1927e ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/spcr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index cd36a97b0ea2..fa12e740386d 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -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.