Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Markus Probst <markus.probst@posteo.de>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3 1/2] serial: earlycon: add uart_clk_freq parameter
Date: Sun, 12 Jul 2026 18:40:07 +0200	[thread overview]
Message-ID: <2026071251-unifier-vastly-dce4@gregkh> (raw)
In-Reply-To: <41b6b5d8810dc9ab658541840c1ebf8ad31ca8bc.camel@posteo.de>

On Sun, Jul 12, 2026 at 04:36:17PM +0000, Markus Probst wrote:
> 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 <markus.probst@posteo.de>
> > > ---
> > >  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.

Then it belongs in the second patch, right?

thanks,

greg k-h

  reply	other threads:[~2026-07-12 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15  0:40 [PATCH v3 0/2] ACPI: SPCR: Support UART clock frequency field Markus Probst
2026-06-15  0:40 ` [PATCH v3 1/2] serial: earlycon: add uart_clk_freq parameter Markus Probst
2026-07-10 12:36   ` Greg Kroah-Hartman
2026-07-12 16:36     ` Markus Probst
2026-07-12 16:40       ` Greg Kroah-Hartman [this message]
2026-07-12 16:46         ` Markus Probst
2026-06-15  0:40 ` [PATCH v3 2/2] ACPI: SPCR: Support UART clock frequency field Markus Probst
2026-07-10 12:34   ` Greg Kroah-Hartman

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=2026071251-unifier-vastly-dce4@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=markus.probst@posteo.de \
    --cc=rafael@kernel.org \
    /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