Commit e86f59c3 authored by Deepak Saxena's avatar Deepak Saxena Committed by Russell King

[ARM PATCH] 1810/1: Support for non-PXA XScale UARTs

Patch from Deepak Saxena

Supersedes 1809/1
parent 157c0342
......@@ -170,7 +170,8 @@ static const struct serial_uart_config uart_config[PORT_MAX_8250+1] = {
{ "ST16654", 64, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH },
{ "XR16850", 128, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH },
{ "RSA", 2048, UART_CLEAR_FIFO | UART_USE_FIFO },
{ "NS16550A", 16, UART_CLEAR_FIFO | UART_USE_FIFO | UART_NATSEMI }
{ "NS16550A", 16, UART_CLEAR_FIFO | UART_USE_FIFO | UART_NATSEMI },
{ "XScale", 32, UART_CLEAR_FIFO | UART_USE_FIFO },
};
static _INLINE_ unsigned int serial_in(struct uart_8250_port *up, int offset)
......@@ -1512,6 +1513,8 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,
up->ier &= ~UART_IER_MSI;
if (UART_ENABLE_MS(&up->port, termios->c_cflag))
up->ier |= UART_IER_MSI;
if (up->port.type == PORT_XSCALE)
up->ier |= UART_IER_UUE | UART_IER_RTOIE;
serial_out(up, UART_IER, up->ier);
......@@ -1953,6 +1956,10 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
* First save the UER then disable the interrupts
*/
ier = serial_in(up, UART_IER);
if (up->port.type == PORT_XSCALE)
serial_out(up, UART_IER, UART_IER_UUE);
else
serial_out(up, UART_IER, 0);
/*
......
......@@ -36,7 +36,8 @@
#define PORT_16850 12
#define PORT_RSA 13
#define PORT_NS16550A 14
#define PORT_MAX_8250 14 /* max port ID */
#define PORT_XSCALE 15
#define PORT_MAX_8250 15 /* max port ID */
/*
* ARM specific type numbers. These are not currently guaranteed
......
......@@ -142,7 +142,7 @@
#define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */
/*
* The Intel PXA2xx chip defines those bits
* The Intel XScale on-chip UARTs define these bits
*/
#define UART_IER_DMAE 0x80 /* DMA Requests Enable */
#define UART_IER_UUE 0x40 /* UART Unit Enable */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment