serial: uartps: Wait for tx_empty in console setup
authorRaviteja Narayanam <raviteja.narayanam@xilinx.com>
Thu, 9 Apr 2020 06:26:02 +0000 (11:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Apr 2020 14:15:14 +0000 (16:15 +0200)
commit42e11948ddf68b9f799cad8c0ddeab0a39da33e8
tree4c5aed3532418438e9b61ea3d7dcc8d6d29ec2d0
parent8fd31e69f890f691b7c548de20a7ee74955df593
serial: uartps: Wait for tx_empty in console setup

On some platforms, the log is corrupted while console is being
registered. It is observed that when set_termios is called, there
are still some bytes in the FIFO to be transmitted.

So, wait for tx_empty inside cdns_uart_console_setup before calling
set_termios.

Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1586413563-29125-2-git-send-email-raviteja.narayanam@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c