diff options
author | Vineet Gupta <Vineet.Gupta1@synopsys.com> | 2015-01-06 11:29:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 22:33:04 (GMT) |
commit | 5567c37dea5e3146c26a691451925218bd484c01 (patch) | |
tree | fcff2548bb596798598fa312250d15cb92e26e36 /drivers/tty/serial/8250 | |
parent | fddceb8b5399083bcc042266f188116cc779fc80 (diff) | |
download | linux-5567c37dea5e3146c26a691451925218bd484c01.tar.xz |
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>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r-- | drivers/tty/serial/8250/8250_early.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index 4858b8a..ce2a8ab 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -95,13 +95,16 @@ static void __init early_serial8250_write(struct console *console, /* Save the IER and disable interrupts */ ier = serial8250_early_in(port, UART_IER); - serial8250_early_out(port, UART_IER, 0); + 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); - serial8250_early_out(port, UART_IER, ier); + + if (ier) + serial8250_early_out(port, UART_IER, ier); } static unsigned int __init probe_baud(struct uart_port *port) |