Re: [PATCH v3 1/2] serial: earlycon: add uart_clk_freq parameter

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-serial,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel
Message-ID <2026071048-imprudent-pumice-9b28@gregkh>
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 <[email protected]>
> ---
>  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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.