lkml.org 
[lkml]   [2022]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/2] drivers: serial: earlycon: Pass device-tree node
    Date
    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@gmail.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;
    };

    struct earlycon_id {
    --
    2.37.0
    \
     
     \ /
      Last update: 2022-07-28 16:29    [W:2.544 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site