serial: 8250_early: optimize early 8250 uart

In early 8250, IER is already zero so no point in writing this - twice
per line

This helped improve the SystemC model based ARC OSCI platform

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vineet Gupta 2015-01-06 16:59:10 +05:30 committed by Greg Kroah-Hartman
parent fddceb8b53
commit 5567c37dea

View File

@ -95,12 +95,15 @@ static void __init early_serial8250_write(struct console *console,
/* Save the IER and disable interrupts */
ier = serial8250_early_in(port, UART_IER);
if (ier)
serial8250_early_out(port, UART_IER, 0);
uart_console_write(port, s, count, serial_putc);
/* Wait for transmitter to become empty and restore the IER */
wait_for_xmitr(port);
if (ier)
serial8250_early_out(port, UART_IER, ier);
}