ARM: meson: serial: don't reset port on uart startup
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 18 Nov 2015 14:41:12 +0000 (14:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Dec 2015 03:59:48 +0000 (19:59 -0800)
commit00661dd855b5b174aa176a9ab9437d86ef4f8f1a
tree1249ecfd5759347eb13ccf2cc6804cbf871012e5
parent1bc1f17b7f1ca320b389622e3c7fbf4ee8991f61
ARM: meson: serial: don't reset port on uart startup

When the uart startup entry is called, do not reset the port as this
could cause issues with anything left in the FIFO from a previous operation
such as a console write. Move the hardware reset to probe time and simply
clear the errors before enabling the port.

This fixes the issue where the console could become corrupted as there
where characters left in the output or output fifo when a user process
such as systemd would open/close the uart to transmit characters.

For example, you get:
    [    3.252263] systemd[1]: Dete

instead of:
    [    3.338801] systemd[1]: Detected architecture arm.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Tested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/meson_uart.c