From: Markuss Broks <markuss.broks@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jami Kettunen <jami.kettunen@protonmail.com>,
Markuss Broks <markuss.broks@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Ard Biesheuvel <ardb@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>, Helge Deller <deller@gmx.de>,
Borislav Petkov <bp@suse.de>,
"Paul E. McKenney" <paulmck@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Will Deacon <will@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
Muchun Song <muchun.song@linux.dev>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Kim Phillips <kim.phillips@amd.com>,
linux-doc@vger.kernel.org, linux-efi@vger.kernel.org,
linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH v3 1/3] drivers: serial: earlycon: Pass device-tree node
Date: Wed, 21 Dec 2022 12:53:58 +0200 [thread overview]
Message-ID: <20221221105402.6598-2-markuss.broks@gmail.com> (raw)
In-Reply-To: <20221221105402.6598-1-markuss.broks@gmail.com>
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 4f6e9bf57169..0c7a789d7eb7 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -307,6 +307,9 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
strscpy(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 fd59f600094a..0b06c0ee7705 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -783,6 +783,7 @@ struct earlycon_device {
struct uart_port port;
char options[16]; /* e.g., 115200n8 */
unsigned int baud;
+ unsigned long node;
};
struct earlycon_id {
--
2.39.0
next prev parent reply other threads:[~2022-12-21 10:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 10:53 [PATCH v3 0/3] Add generic framebuffer support to EFI earlycon driver Markuss Broks
2022-12-21 10:53 ` Markuss Broks [this message]
2022-12-21 10:53 ` [PATCH v3 2/3] efi: earlycon: move to video/console to prepare for changes Markuss Broks
2022-12-21 10:54 ` [PATCH v3 3/3] efi: earlycon: Add support for generic framebuffers Markuss Broks
2022-12-23 14:42 ` [PATCH v3 0/3] Add generic framebuffer support to EFI earlycon driver Ard Biesheuvel
2022-12-23 14:58 ` Markuss Broks
2023-01-10 14:32 ` Ard Biesheuvel
2022-12-28 14:03 ` Andy Shevchenko
2023-01-10 14:30 ` Ard Biesheuvel
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=20221221105402.6598-2-markuss.broks@gmail.com \
--to=markuss.broks@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=bp@suse.de \
--cc=corbet@lwn.net \
--cc=damien.lemoal@opensource.wdc.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jami.kettunen@protonmail.com \
--cc=jirislaby@kernel.org \
--cc=kim.phillips@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=muchun.song@linux.dev \
--cc=paulmck@kernel.org \
--cc=rdunlap@infradead.org \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).