All of lore.kernel.org
 help / color / mirror / Atom feed
From: Esben Haabendal <esben@geanix.com>
To: linux-rt-users@vger.kernel.org
Subject: [RFC PATCH v2 0/2] serial: imx: Switch to nbcon console
Date: Fri,  5 Apr 2024 09:56:36 +0200	[thread overview]
Message-ID: <cover.1712303358.git.esben@geanix.com> (raw)

This is a first attempt at porting another serial console driver to nbcon.

The first patch is a preparatory patch, thought to be suitable for mainline
inclusion now, while the second patch is for rt only for now.

The second patch does have quite a copy-paste feeling to it.

The imx_uart_console_write_atomic() and imx_uart_console_write_thread()
includes copies of code from the old imx_uart_console_write() function.
This is similar to current status of nbcon support in 8250 driver.

The midle part of imx_uart_console_write_thread() is identical to the
middle part of serial8250_console_write_thread() in
drivers/tty/serial/8250/8250_port.c, except for the arguments to
uart_console_write() function.

There is clearly potential for writing some common code to avoid both cases
of copy-paste code.

I am unsure about what the plan is for keeping the legacy console code in
the drivers. Are we going to drop that before submitting the code to
mainline?

v2:
- Switch to tight loop (no udelay()) in atomic context.
- Increase timeout to 1 second.
- Add note in commit message about (no) error handling on timeout.


Esben Haabendal (2):
  serial: imx: Introduce timeout when waiting on transmitter empty
  serial: imx: Switch to nbcon console

 drivers/tty/serial/imx.c | 161 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 157 insertions(+), 4 deletions(-)

-- 
2.44.0


             reply	other threads:[~2024-04-05  7:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05  7:56 Esben Haabendal [this message]
2024-04-05  7:56 ` [RFC PATCH v2 1/2] serial: imx: Introduce timeout when waiting on transmitter empty Esben Haabendal
2024-04-05  8:06   ` Marc Kleine-Budde
2024-04-05  8:32     ` Esben Haabendal
2024-04-05  7:56 ` [RFC PATCH v2 2/2] serial: imx: Switch to nbcon console Esben Haabendal
2024-04-15 10:28   ` John Ogness
2024-09-13  6:54     ` Esben Haabendal
2024-09-13  7:59       ` John Ogness
2024-09-13  8:29         ` Esben Haabendal
2024-04-05  8:43 ` [RFC PATCH v2 0/2] " Marc Kleine-Budde

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=cover.1712303358.git.esben@geanix.com \
    --to=esben@geanix.com \
    --cc=linux-rt-users@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.