Re: [PATCH v3 1/2] serial: earlycon: add uart_clk_freq parameter
From: Greg Kroah-Hartman
Date: Fri Jul 10 2026 - 08:43:08 EST
On Mon, Jun 15, 2026 at 12:40:21AM +0000, Markus Probst wrote:
> Add function `setup_earlycon_with_uartclk`. This allows the
> options string to be reused with `add_preferred_console`, while still
> allowing to set the uart clock frequency. This will be used in the
> following commit ("ACPI: SPCR: Support UART clock frequency field").
>
> No logical change intended.
>
> Signed-off-by: Markus Probst <markus.probst@xxxxxxxxx>
> ---
> drivers/tty/serial/earlycon.c | 17 ++++++++++++-----
> include/linux/serial_core.h | 11 +++++++++--
> 2 files changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index ab9af37f6cda..5a20fe9e3fb6 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -135,11 +135,14 @@ static int __init parse_options(struct earlycon_device *device, char *options)
> return 0;
> }
>
> -static int __init register_earlycon(char *buf, const struct earlycon_id *match)
> +static int __init register_earlycon(char *buf, unsigned int uart_clk_freq,
> + const struct earlycon_id *match)
> {
> int err;
> struct uart_port *port = &early_console_dev.port;
>
> + port->uartclk = uart_clk_freq;
This looks like a logical change, the code today does not do that
anywhere, right?
thanks,
greg k-h