linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markuss Broks <markuss.broks@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: ~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org,
	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>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Borislav Petkov <bp@suse.de>, Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Michal Suchanek <msuchanek@suse.de>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Wei Ming Chen <jj251510319013@gmail.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Tony Lindgren <tony@atomide.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 v2 2/3] drivers: serial: earlycon: Pass device-tree node
Date: Sat,  6 Aug 2022 19:32:23 +0300	[thread overview]
Message-ID: <20220806163255.10404-3-markuss.broks@gmail.com> (raw)
In-Reply-To: <20220806163255.10404-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 bc210ae8173d97d5ef422468acf2755a853cb943..be2f01520f6608f6ece725dd83d2526e30477b47 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.offset = offset;
+
 	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..e65b9aba4e5fdaedb560d2cbbf326a11cfecbcac 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;
+	int offset;
 };
 
 struct earlycon_id {
-- 
2.37.0


  parent reply	other threads:[~2022-08-06 16:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-06 16:32 [PATCH v2 0/3] Add generic framebuffer support to EFI earlycon driver Markuss Broks
2022-08-06 16:32 ` [PATCH v2 1/3] drivers: serial: earlycon: Correct argument name Markuss Broks
2022-08-06 16:56   ` Andy Shevchenko
2022-08-08  1:28   ` kernel test robot
2022-08-08 15:55   ` Rob Herring
2022-08-06 16:32 ` Markuss Broks [this message]
2022-08-06 16:32 ` [PATCH v2 3/3] efi: earlycon: Add support for generic framebuffers and move to console subsystem Markuss Broks
2022-08-06 21:37   ` Andy Shevchenko
2022-08-07 13:16   ` kernel test robot
2022-08-14  0:01   ` kernel test robot
2022-08-14  7:04   ` kernel test robot
2022-09-06 21:52   ` Daniel Vetter
2022-09-07  6:55     ` Thomas Zimmermann
2022-09-07  8:22     ` Arnd Bergmann
2022-09-06 16:54 ` [PATCH v2 0/3] Add generic framebuffer support to EFI earlycon driver 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=20220806163255.10404-3-markuss.broks@gmail.com \
    --to=markuss.broks@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=b.zolnierkie@samsung.com \
    --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=javierm@redhat.com \
    --cc=jirislaby@kernel.org \
    --cc=jj251510319013@gmail.com \
    --cc=keescook@chromium.org \
    --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=maarten.lankhorst@linux.intel.com \
    --cc=msuchanek@suse.de \
    --cc=paulmck@kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=tony@atomide.com \
    --cc=tzimmermann@suse.de \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).