aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2005-11-12 16:58:05 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-12 16:58:05 -0500
commit5c8c755ce508a9d41d8a8d80fff387cb4e2929fc (patch)
tree6db5a7e195068fc4ca20651a23f20a2b0350295e /drivers/serial
parentcd52d1ee9a92587b242d946a2300a3245d3b885a (diff)
[SERIAL] don't disable xscale serial ports after autoconfig
xscale-type UARTs have an extra bit (UUE) in the IER register that has to be written as 1 to enable the UART. At the end of autoconfig() in drivers/serial/8250.c, the IER register is unconditionally written as zero, which turns off the UART, and makes any subsequent printch() hang the box. Since other 8250-type UARTs don't have this enable bit and are thus always 'enabled' in this sense, it can't hurt to enable xscale-type serial ports all the time as well. The attached patch changes the autoconfig() exit path to see if the port has an UUE enable bit, and if yes, to write UUE=1 instead of just putting a zero into IER, using the same test as is used at the beginning of serial8250_console_write(). Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 3742753241ee..e08510d09ff6 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -999,7 +999,10 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
999 serial_outp(up, UART_MCR, save_mcr); 999 serial_outp(up, UART_MCR, save_mcr);
1000 serial8250_clear_fifos(up); 1000 serial8250_clear_fifos(up);
1001 (void)serial_in(up, UART_RX); 1001 (void)serial_in(up, UART_RX);
1002 serial_outp(up, UART_IER, 0); 1002 if (up->capabilities & UART_CAP_UUE)
1003 serial_outp(up, UART_IER, UART_IER_UUE);
1004 else
1005 serial_outp(up, UART_IER, 0);
1003 1006
1004 out: 1007 out:
1005 spin_unlock_irqrestore(&up->port.lock, flags); 1008 spin_unlock_irqrestore(&up->port.lock, flags);