From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vladimir Zapolskiy <vz@mleia.com>
Cc: Roland Stigge <stigge@antcom.de>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Sylvain Lemieux <slemieux.tyco@gmail.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Jiri Slaby <jslaby@suse.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] tty: serial: lpc32xx_hs: fix missing console boot messages
Date: Tue, 15 Jan 2019 18:18:14 +0100 [thread overview]
Message-ID: <20190115171814.21789-1-alexandre.belloni@bootlin.com> (raw)
When probing the HSUART, it is put in loopback mode in order to prevent a
potential issue that may happen on RX (Errata HSUART.1).
serial_lpc32xx_startup() moves it out of loopback mode but this is too late
to get the kernel boot messages before userspace opens the device.
Also get out of loopback mode in lpc32xx_hsuart_console_setup().
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/tty/serial/lpc32xx_hs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
index d1d73261575b..f4e27d0ad947 100644
--- a/drivers/tty/serial/lpc32xx_hs.c
+++ b/drivers/tty/serial/lpc32xx_hs.c
@@ -151,6 +151,8 @@ static void lpc32xx_hsuart_console_write(struct console *co, const char *s,
local_irq_restore(flags);
}
+static void lpc32xx_loopback_set(resource_size_t mapbase, int state);
+
static int __init lpc32xx_hsuart_console_setup(struct console *co,
char *options)
{
@@ -170,6 +172,8 @@ static int __init lpc32xx_hsuart_console_setup(struct console *co,
if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow);
+ lpc32xx_loopback_set(port->mapbase, 0); /* get out of loopback mode */
+
return uart_set_options(port, co, baud, parity, bits, flow);
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-01-15 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 17:18 Alexandre Belloni [this message]
2019-01-22 22:38 ` [PATCH] tty: serial: lpc32xx_hs: fix missing console boot messages Vladimir Zapolskiy
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=20190115171814.21789-1-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=slemieux.tyco@gmail.com \
--cc=stigge@antcom.de \
--cc=vz@mleia.com \
/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).