* [PATCH,resend] don't disable xscale serial ports after autoconfig
@ 2005-10-30 13:42 Lennert Buytenhek
2005-11-12 21:59 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: Lennert Buytenhek @ 2005-10-30 13:42 UTC (permalink / raw)
To: rmk; +Cc: linux-kernel, dsaxena
(please CC, not on the list)
Hi,
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().
cheers,
Lennert
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
diff -urN linux-2.6.13.orig/drivers/serial/8250.c linux-2.6.13/drivers/serial/8250.c
--- linux-2.6.13.orig/drivers/serial/8250.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/drivers/serial/8250.c 2005-10-02 21:38:51.000000000 +0200
@@ -936,7 +936,10 @@
serial_outp(up, UART_MCR, save_mcr);
serial8250_clear_fifos(up);
(void)serial_in(up, UART_RX);
- serial_outp(up, UART_IER, 0);
+ if (up->capabilities & UART_CAP_UUE)
+ serial_outp(up, UART_IER, UART_IER_UUE);
+ else
+ serial_outp(up, UART_IER, 0);
out:
spin_unlock_irqrestore(&up->port.lock, flags);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH,resend] don't disable xscale serial ports after autoconfig
2005-10-30 13:42 [PATCH,resend] don't disable xscale serial ports after autoconfig Lennert Buytenhek
@ 2005-11-12 21:59 ` Russell King
0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2005-11-12 21:59 UTC (permalink / raw)
To: Lennert Buytenhek; +Cc: linux-kernel, dsaxena
On Sun, Oct 30, 2005 at 02:42:09PM +0100, Lennert Buytenhek wrote:
> 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.
Applied, thanks.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-12 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-30 13:42 [PATCH,resend] don't disable xscale serial ports after autoconfig Lennert Buytenhek
2005-11-12 21:59 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome