Re: [PATCH] ACPI: SPCR: Support UART clock frequency field

From: Rafael J. Wysocki

Date: Fri May 08 2026 - 15:20:13 EST


On Tue, May 5, 2026 at 9:36 PM Markus Probst <markus.probst@xxxxxxxxx> wrote:
>
> 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@xxxxxxxxx>
> ---
> 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);
>
> ---

Please have a look at the sashiko.dev feedback at

https://sashiko.dev/#/patchset/20260505-acpi_spcr-v1-1-fd4bc6f4eb53%40posteo.de

and let me know what you think.