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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        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)
 {
        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);
 }