linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: serial: lpc32xx_hs: fix missing console boot messages
@ 2019-01-15 17:18 Alexandre Belloni
  2019-01-22 22:38 ` Vladimir Zapolskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Belloni @ 2019-01-15 17:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Vladimir Zapolskiy
  Cc: Roland Stigge, Alexandre Belloni, Sylvain Lemieux, linux-kernel,
	linux-serial, Jiri Slaby, linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tty: serial: lpc32xx_hs: fix missing console boot messages
  2019-01-15 17:18 [PATCH] tty: serial: lpc32xx_hs: fix missing console boot messages Alexandre Belloni
@ 2019-01-22 22:38 ` Vladimir Zapolskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Zapolskiy @ 2019-01-22 22:38 UTC (permalink / raw)
  To: Alexandre Belloni, Greg Kroah-Hartman
  Cc: Roland Stigge, Sylvain Lemieux, linux-kernel, linux-serial,
	Jiri Slaby, linux-arm-kernel

Hi Alexandre,

On 01/15/2019 07:18 PM, Alexandre Belloni wrote:
> 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>

the change looks good, thank you.

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-22 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 17:18 [PATCH] tty: serial: lpc32xx_hs: fix missing console boot messages Alexandre Belloni
2019-01-22 22:38 ` Vladimir Zapolskiy

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).