Commit 0e49c8cf authored by Russell King's avatar Russell King

[SERIAL] Fix up ARM serial drivers

This cset makes ARM serial drivers build.
parent e51d259e
...@@ -231,7 +231,7 @@ static void ambauart_tx_chars(struct uart_port *port) ...@@ -231,7 +231,7 @@ static void ambauart_tx_chars(struct uart_port *port)
return; return;
} }
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
ambauart_stop_tx(port); ambauart_stop_tx(port, 0);
return; return;
} }
...@@ -248,7 +248,7 @@ static void ambauart_tx_chars(struct uart_port *port) ...@@ -248,7 +248,7 @@ static void ambauart_tx_chars(struct uart_port *port)
uart_write_wakeup(port); uart_write_wakeup(port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
ambauart_stop_tx(port); ambauart_stop_tx(port, 0);
} }
static void ambauart_modem_status(struct uart_port *port) static void ambauart_modem_status(struct uart_port *port)
......
...@@ -69,7 +69,8 @@ anakin_transmit_buffer(struct uart_port *port) ...@@ -69,7 +69,8 @@ anakin_transmit_buffer(struct uart_port *port)
{ {
struct circ_buf *xmit = &port->info->xmit; struct circ_buf *xmit = &port->info->xmit;
while (!(anakin_in(port, 0x10) & TXEMPTY)); while (!(anakin_in(port, 0x10) & TXEMPTY))
barrier();
anakin_out(port, 0x14, xmit->buf[xmit->tail]); anakin_out(port, 0x14, xmit->buf[xmit->tail]);
anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST); anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST);
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE-1); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE-1);
...@@ -386,7 +387,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count) ...@@ -386,7 +387,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
* Now, do each character * Now, do each character
*/ */
for (i = 0; i < count; i++, s++) { for (i = 0; i < count; i++, s++) {
while (!(anakin_in(port, 0x10) & TXEMPTY)); while (!(anakin_in(port, 0x10) & TXEMPTY))
barrier();
/* /*
* Send the character out. * Send the character out.
...@@ -396,7 +398,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count) ...@@ -396,7 +398,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST); anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST);
if (*s == 10) { if (*s == 10) {
while (!(anakin_in(port, 0x10) & TXEMPTY)); while (!(anakin_in(port, 0x10) & TXEMPTY))
barrier();
anakin_out(port, 0x14, 13); anakin_out(port, 0x14, 13);
anakin_out(port, 0x18, anakin_in(port, 0x18) anakin_out(port, 0x18, anakin_in(port, 0x18)
| SENDREQUEST); | SENDREQUEST);
...@@ -407,7 +410,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count) ...@@ -407,7 +410,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
* Finally, wait for transmitter to become empty * Finally, wait for transmitter to become empty
* and restore the interrupts * and restore the interrupts
*/ */
while (!(anakin_in(port, 0x10) & TXEMPTY)); while (!(anakin_in(port, 0x10) & TXEMPTY))
barrier();
if (status & IRQENABLE) { if (status & IRQENABLE) {
local_irq_save(flags); local_irq_save(flags);
......
...@@ -193,7 +193,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) ...@@ -193,7 +193,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
return; return;
} }
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
clps711xuart_stop_tx(port); clps711xuart_stop_tx(port, 0);
return; return;
} }
...@@ -210,7 +210,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) ...@@ -210,7 +210,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
uart_write_wakeup(port); uart_write_wakeup(port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
clps711xuart_stop_tx(port); clps711xuart_stop_tx(port, 0);
} }
static unsigned int clps711xuart_tx_empty(struct uart_port *port) static unsigned int clps711xuart_tx_empty(struct uart_port *port)
...@@ -425,6 +425,7 @@ static struct uart_port clps711x_ports[UART_NR] = { ...@@ -425,6 +425,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
.uartclk = 3686400, .uartclk = 3686400,
.fifosize = 16, .fifosize = 16,
.ops = &clps711x_pops, .ops = &clps711x_pops,
.line = 0,
.flags = ASYNC_BOOT_AUTOCONF, .flags = ASYNC_BOOT_AUTOCONF,
}, },
{ {
...@@ -433,6 +434,7 @@ static struct uart_port clps711x_ports[UART_NR] = { ...@@ -433,6 +434,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
.uartclk = 3686400, .uartclk = 3686400,
.fifosize = 16, .fifosize = 16,
.ops = &clps711x_pops, .ops = &clps711x_pops,
.line = 1,
.flags = ASYNC_BOOT_AUTOCONF, .flags = ASYNC_BOOT_AUTOCONF,
} }
}; };
......
...@@ -193,7 +193,8 @@ static void uart00_tx_chars(struct uart_port *port) ...@@ -193,7 +193,8 @@ static void uart00_tx_chars(struct uart_port *port)
int count; int count;
if (port->x_char) { if (port->x_char) {
while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15); while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
barrier();
UART_PUT_CHAR(port, port->x_char); UART_PUT_CHAR(port, port->x_char);
port->icount.tx++; port->icount.tx++;
port->x_char = 0; port->x_char = 0;
...@@ -206,7 +207,8 @@ static void uart00_tx_chars(struct uart_port *port) ...@@ -206,7 +207,8 @@ static void uart00_tx_chars(struct uart_port *port)
count = port->fifosize >> 1; count = port->fifosize >> 1;
do { do {
while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15); while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
barrier();
UART_PUT_CHAR(port, xmit->buf[xmit->tail]); UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
port->icount.tx++; port->icount.tx++;
......
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