From: Markus Probst <markus.probst@posteo.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Ard Biesheuvel <ardb@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-efi@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH RESEND v2 1/2] serial: earlycon: add uart_clk_freq parameter
Date: Tue, 09 Jun 2026 14:56:43 +0000 [thread overview]
Message-ID: <44a6e266e6ead9b7cbbb6c9c11f18f21a13d8c2a.camel@posteo.de> (raw)
In-Reply-To: <CAMuHMdXH0mR9Sr+ze2_m94uc46_7gubApzWOkf+vUO+w=DmNoQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]
On Tue, 2026-06-09 at 08:53 +0200, Geert Uytterhoeven wrote:
> Hi Markus,
>
> On Tue, 9 Jun 2026 at 00:40, Markus Probst <markus.probst@posteo.de> wrote:
> > Add `uart_clk_freq` parameter to `setup_earlycon`. 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@posteo.de>
>
> > --- 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;
>
> Who is actually consuming this value?
I think primarily init_port in drivers/tty/serial/8250/8250_early.c.
> Earlycon typically works with the serial console, as configured before
> Linux boot by the firmware.
Thats defined in the SPCR table. If "Configured Baud Rate" is set to 0,
it will use it as is [1]. If not, it will configure it.
Thanks
- Markus Probst
[1]https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table
> The Microsoft doc referenced in patch 2 seem to agree with that:
>
> "On a system where the BIOS or system firmware uses the serial
> port for console input/output, this table should be used to convey
> information about the settings, to ensure a seamless transition
> between the firmware console output and Windows EMS output."
>
> > +
> > /* On parsing error, pass the options buf to the setup function */
> > if (buf && !parse_options(&early_console_dev, buf))
> > buf = NULL;
>
> Gr{oetje,eeting}s,
>
> Geert
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
next prev parent reply other threads:[~2026-06-09 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 22:40 [PATCH RESEND v2 0/2] ACPI: SPCR: Support UART clock frequency field Markus Probst
2026-06-08 22:40 ` [PATCH RESEND v2 1/2] serial: earlycon: add uart_clk_freq parameter Markus Probst
2026-06-09 5:30 ` Greg Kroah-Hartman
2026-06-09 6:53 ` Geert Uytterhoeven
2026-06-09 14:56 ` Markus Probst [this message]
2026-06-08 22:40 ` [PATCH RESEND v2 2/2] ACPI: SPCR: Support UART clock frequency field Markus Probst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44a6e266e6ead9b7cbbb6c9c11f18f21a13d8c2a.camel@posteo.de \
--to=markus.probst@posteo.de \
--cc=ardb@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jirislaby@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®