aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/au1x00_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/au1x00_uart.c')
-rw-r--r--drivers/serial/au1x00_uart.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c
index 344022fe53ef..29f94bbb79be 100644
--- a/drivers/serial/au1x00_uart.c
+++ b/drivers/serial/au1x00_uart.c
@@ -1121,6 +1121,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up)
1121 } 1121 }
1122} 1122}
1123 1123
1124static void au1x00_console_putchar(struct uart_port *port, int ch)
1125{
1126 struct uart_8250_port *up = (struct uart_8250_port *)port;
1127
1128 wait_for_xmitr(up);
1129 serial_out(up, UART_TX, ch);
1130}
1131
1124/* 1132/*
1125 * Print a string to the serial port trying not to disturb 1133 * Print a string to the serial port trying not to disturb
1126 * any possible real use of the port... 1134 * any possible real use of the port...
@@ -1132,7 +1140,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
1132{ 1140{
1133 struct uart_8250_port *up = &serial8250_ports[co->index]; 1141 struct uart_8250_port *up = &serial8250_ports[co->index];
1134 unsigned int ier; 1142 unsigned int ier;
1135 int i;
1136 1143
1137 /* 1144 /*
1138 * First save the UER then disable the interrupts 1145 * First save the UER then disable the interrupts
@@ -1140,22 +1147,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
1140 ier = serial_in(up, UART_IER); 1147 ier = serial_in(up, UART_IER);
1141 serial_out(up, UART_IER, 0); 1148 serial_out(up, UART_IER, 0);
1142 1149
1143 /* 1150 uart_console_write(&up->port, s, count, au1x00_console_putchar);
1144 * Now, do each character
1145 */
1146 for (i = 0; i < count; i++, s++) {
1147 wait_for_xmitr(up);
1148
1149 /*
1150 * Send the character out.
1151 * If a LF, also do CR...
1152 */
1153 serial_out(up, UART_TX, *s);
1154 if (*s == 10) {
1155 wait_for_xmitr(up);
1156 serial_out(up, UART_TX, 13);
1157 }
1158 }
1159 1151
1160 /* 1152 /*
1161 * Finally, wait for transmitter to become empty 1153 * Finally, wait for transmitter to become empty