]> git.hungrycats.org Git - linux/commitdiff
[ARM PATCH] 1810/1: Support for non-PXA XScale UARTs
authorDeepak Saxena <dsaxena@net.rmk.(none)>
Wed, 14 Apr 2004 19:39:05 +0000 (20:39 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Wed, 14 Apr 2004 19:39:05 +0000 (20:39 +0100)
Patch from Deepak Saxena

Supersedes 1809/1

drivers/serial/8250.c
include/linux/serial_core.h
include/linux/serial_reg.h

index 75e1e4a9648b1d0da85ffea0f73192ac7c9652ca..589a4134af8a7f621247021f2d1579f2755e0d51 100644 (file)
@@ -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,7 +1956,11 @@ 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);
-       serial_out(up, UART_IER, 0);
+
+       if (up->port.type == PORT_XSCALE)
+               serial_out(up, UART_IER, UART_IER_UUE);
+       else
+               serial_out(up, UART_IER, 0);
 
        /*
         *      Now, do each character
index 701d138cefb8c3a8a08aee271bffb2fbaf483fc6..4d7dd853874b84eed5693d7431584b49e9028fad 100644 (file)
@@ -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
index 49aa0db7fa0e095beda9f96d1324f2cf6c6d8a7e..7b2414bd5837ad219688f2146adf2295d1dde604 100644 (file)
 #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 */