mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI: SPCR: Support UART clock frequency field
@ 2026-05-05 19:36 Markus Probst
  2026-05-08 19:19 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Probst @ 2026-05-05 19:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown; +Cc: linux-acpi, linux-kernel, Markus Probst

The Microsoft Serial Port Console Redirection (SPCR) specification
revision 1.08 comprises additional field: UART Clock Frequency [1].

It contains a non-zero value indicating the UART clock frequency in Hz.

Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table [1]
Signed-off-by: Markus Probst <markus.probst@posteo.de>
---
 drivers/acpi/spcr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index 73cb933fdc89..d80ad87efae0 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -220,6 +220,9 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
 	if (!baud_rate) {
 		snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype,
 			 table->serial_port.address);
+	} else if (table->header.revision >= 3 && table->uart_clk_freq) {
+		snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d,%u", uart, iotype,
+			table->serial_port.address, baud_rate, table->uart_clk_freq);
 	} else {
 		snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype,
 			 table->serial_port.address, baud_rate);

---
base-commit: 9e0898f1c0f134c6bad146ca8578f73c3e40ac0a
change-id: 20260430-acpi_spcr-61902fd923f2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-09  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-05 19:36 [PATCH] ACPI: SPCR: Support UART clock frequency field Markus Probst
2026-05-08 19:19 ` Rafael J. Wysocki
2026-05-09  6:13   ` Markus Probst
2026-05-09  8:47     ` Markus Probst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®