[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YuKfaVG/ZbYtFjS/@kroah.com>
Date: Thu, 28 Jul 2022 16:38:33 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Markuss Broks <markuss.broks@...il.com>
Cc: linux-kernel@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
Jonathan Corbet <corbet@....net>,
Ard Biesheuvel <ardb@...nel.org>,
Jiri Slaby <jirislaby@...nel.org>,
Helge Deller <deller@....de>,
"Paul E. McKenney" <paulmck@...nel.org>,
Borislav Petkov <bp@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Randy Dunlap <rdunlap@...radead.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Javier Martinez Canillas <javierm@...hat.com>,
Michal Suchanek <msuchanek@...e.de>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>,
Wei Ming Chen <jj251510319013@...il.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Tony Lindgren <tony@...mide.com>, linux-doc@...r.kernel.org,
linux-efi@...r.kernel.org, linux-serial@...r.kernel.org,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Petr Mladek <pmladek@...e.com>
Subject: Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node
On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote:
> Pass a pointer to device-tree node in case the driver probed from
> OF. This makes early console drivers able to fetch options from
> device-tree node properties.
>
> Signed-off-by: Markuss Broks <markuss.broks@...il.com>
> ---
> drivers/tty/serial/earlycon.c | 3 +++
> include/linux/serial_core.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index 57c70851f22a0e78805f34d1a7700708104b6f6a..14e8a7fe54486a1c377a6659c37a73858de5bf0b 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -304,6 +304,9 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
> strlcpy(early_console_dev.options, options,
> sizeof(early_console_dev.options));
> }
> +
> + early_console_dev.node = node;
> +
> earlycon_init(&early_console_dev, match->name);
> err = match->setup(&early_console_dev, options);
> earlycon_print_info(&early_console_dev);
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index cbd5070bc87f42aa450c4ca7af8a9b59fbe88574..3295721f33e482124fae8370b5889d5d6c012303 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -349,6 +349,7 @@ struct earlycon_device {
> struct uart_port port;
> char options[16]; /* e.g., 115200n8 */
> unsigned int baud;
> + unsigned long node;
That should not be an unsigned long, but rather an 'int'. Something got
messed up, of_setup_earlycon() should be changed to reflect this before
propagating the error to other places in the kernel.
And it's not really a "node" but an "offset", right?
thanks,
greg k-h
Powered by blists - more mailing lists