summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2015-01-27 05:50:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-02 19:11:28 +0100
commita4c639b04f301ddc3f71bc0f2600c3759846db43 (patch)
treea361ab40820d46607a1d4d143934964f5b57bb13 /drivers/tty
parenttty/serial: of_serial: add support for PXA/MMP uarts (diff)
downloadlinux-a4c639b04f301ddc3f71bc0f2600c3759846db43.tar.xz
linux-a4c639b04f301ddc3f71bc0f2600c3759846db43.zip
tty/serial: 8250_early: Add support for PXA UARTs
The PXA variant of the 8250 UART adds a UART enable bit which must not be cleared. Make the earlycon support maintain this bit if it is set. This implies some initialization of the UART, but we cannot unconditionally set the bit as some other variants require this bit to be clear for other functions. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_early.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index ce2a8abd1f54..c31a22b4f845 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -93,10 +93,10 @@ static void __init early_serial8250_write(struct console *console,
struct uart_port *port = &early_device->port;
unsigned int ier;
- /* Save the IER and disable interrupts */
+ /* Save the IER and disable interrupts preserving the UUE bit */
ier = serial8250_early_in(port, UART_IER);
if (ier)
- serial8250_early_out(port, UART_IER, 0);
+ serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
uart_console_write(port, s, count, serial_putc);
@@ -127,9 +127,11 @@ static void __init init_port(struct earlycon_device *device)
struct uart_port *port = &device->port;
unsigned int divisor;
unsigned char c;
+ unsigned int ier;
serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
- serial8250_early_out(port, UART_IER, 0); /* no interrupt */
+ ier = serial8250_early_in(port, UART_IER);
+ serial8250_early_out(port, UART_IER, ier & UART_IER_UUE); /* no interrupt */
serial8250_early_out(port, UART_FCR, 0); /* no fifo */
serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */