diff options
Diffstat (limited to 'drivers/serial/serial_txx9.c')
-rw-r--r-- | drivers/serial/serial_txx9.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index 141173efd463..b848b7d94412 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -863,6 +863,14 @@ static inline void wait_for_xmitr(struct uart_txx9_port *up) | |||
863 | } | 863 | } |
864 | } | 864 | } |
865 | 865 | ||
866 | static void serial_txx9_console_putchar(struct uart_port *port, int ch) | ||
867 | { | ||
868 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; | ||
869 | |||
870 | wait_for_xmitr(up); | ||
871 | sio_out(up, TXX9_SITFIFO, ch); | ||
872 | } | ||
873 | |||
866 | /* | 874 | /* |
867 | * Print a string to the serial port trying not to disturb | 875 | * Print a string to the serial port trying not to disturb |
868 | * any possible real use of the port... | 876 | * any possible real use of the port... |
@@ -874,7 +882,6 @@ serial_txx9_console_write(struct console *co, const char *s, unsigned int count) | |||
874 | { | 882 | { |
875 | struct uart_txx9_port *up = &serial_txx9_ports[co->index]; | 883 | struct uart_txx9_port *up = &serial_txx9_ports[co->index]; |
876 | unsigned int ier, flcr; | 884 | unsigned int ier, flcr; |
877 | int i; | ||
878 | 885 | ||
879 | /* | 886 | /* |
880 | * First save the UER then disable the interrupts | 887 | * First save the UER then disable the interrupts |
@@ -888,22 +895,7 @@ serial_txx9_console_write(struct console *co, const char *s, unsigned int count) | |||
888 | if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES)) | 895 | if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES)) |
889 | sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES); | 896 | sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES); |
890 | 897 | ||
891 | /* | 898 | uart_console_write(&up->port, s, count, serial_txx9_console_putchar); |
892 | * Now, do each character | ||
893 | */ | ||
894 | for (i = 0; i < count; i++, s++) { | ||
895 | wait_for_xmitr(up); | ||
896 | |||
897 | /* | ||
898 | * Send the character out. | ||
899 | * If a LF, also do CR... | ||
900 | */ | ||
901 | sio_out(up, TXX9_SITFIFO, *s); | ||
902 | if (*s == 10) { | ||
903 | wait_for_xmitr(up); | ||
904 | sio_out(up, TXX9_SITFIFO, 13); | ||
905 | } | ||
906 | } | ||
907 | 899 | ||
908 | /* | 900 | /* |
909 | * Finally, wait for transmitter to become empty | 901 | * Finally, wait for transmitter to become empty |