Re: [PATCH v3 1/2] serial: earlycon: add uart_clk_freq parameter
Markus Probst <[email protected]>
| Newsgroups | gmane.linux.acpi.devel,gmane.linux.kernel,gmane.linux.serial |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2026-07-10 at 14:36 +0200, Greg Kroah-Hartman wrote:
> 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?
`register_earlycon` only gets executed once.
Thus early_console_dev.port->uartclk is always 0.
Since all current callers in this patch series use `setup_earlycon`,
the uart_clk_freq parameter is also always 0.
So in case of behaviour/logic, this line does nothing without the 2.
patch.
Thanks
- Markus Probst
>
> thanks,
>
> greg k-h
signature.asc
(application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEgnQYxPSsWOdyMMRzNHYf+OetQ9IFAmpTwnsbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJEDR2H/jnrUPScvMQAK6La++c5TgUg6Dh0ACe aBqWeNBLPfLFiSbCdtmkXSKJw8uGpOyXc+rgpHXMFXQIcNtgfXjHh1Z9axDlv9/N 9Gx7wI0GPBUImZmZuSrzPdPZw43YxAchTXIMnYCDpW55RnXMSgMhe19hHI7xSALO MdXpM8NrmQF7byHHWnMdfP8hVtVPdonjBTNsrUyGaqhHdxyuoRtp9JBSohm4yg7y fGwwVQbu5w6ZM94ActeeV6nQVA2iYp4FKU5bk2LJYag1prCVBEXrLiDtq2opSAve vC0pFPLY1rX6SEYuPzps9rk90T8YfQZocpZKKyLRxnyBAshytwd+WSyuEY4tYayk /yck1LPahPu2vA5ZZCnqP5lcJ/i6hmoZ2NgRcmHtrVyOAQu48wRfa0pleB0YyFpV fL+lUcon74AbML51tPX4LQstXlEZ3+zAY7AzlH9lNAQ3oTel17sexOXvx4qjs+2Q bUw2E5gBiJe6FS1YGkkOC4zKBxQjNhwQayaAUtnU/ArFuNoOF1WtzBoVn+2XLOjH kTrpPcH4Rh0uFuYqBS7RWnvJdBLjRSUIYsHW6G8R5s257Gj+RMa5kokvgs1ukziV dZEQzvOsbQdoO5rClAlB5XAYNjNjSmcneLrLSbPBOBrHDP6Jr+ZErzhnDBcm5qAN t9eoszg5WU5thpiETjjQg6cz =cg6h -----END PGP SIGNATURE-----