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 ee98a867bc6d..1a259cee1a98 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -854,6 +854,14 @@ static inline void wait_for_xmitr(struct uart_txx9_port *up) | |||
854 | } | 854 | } |
855 | } | 855 | } |
856 | 856 | ||
857 | static void serial_txx9_console_putchar(struct uart_port *port, int ch) | ||
858 | { | ||
859 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; | ||
860 | |||
861 | wait_for_xmitr(up); | ||
862 | sio_out(up, TXX9_SITFIFO, ch); | ||
863 | } | ||
864 | |||
857 | /* | 865 | /* |
858 | * Print a string to the serial port trying not to disturb | 866 | * Print a string to the serial port trying not to disturb |
859 | * any possible real use of the port... | 867 | * any possible real use of the port... |
@@ -865,7 +873,6 @@ serial_txx9_console_write(struct console *co, const char *s, unsigned int count) | |||
865 | { | 873 | { |
866 | struct uart_txx9_port *up = &serial_txx9_ports[co->index]; | 874 | struct uart_txx9_port *up = &serial_txx9_ports[co->index]; |
867 | unsigned int ier, flcr; | 875 | unsigned int ier, flcr; |
868 | int i; | ||
869 | 876 | ||
870 | /* | 877 | /* |
871 | * First save the UER then disable the interrupts | 878 | * First save the UER then disable the interrupts |
@@ -879,22 +886,7 @@ serial_txx9_console_write(struct console *co, const char *s, unsigned int count) | |||
879 | if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES)) | 886 | if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES)) |
880 | sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES); | 887 | sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES); |
881 | 888 | ||
882 | /* | 889 | uart_console_write(&up->port, s, count, serial_txx9_console_putchar); |
883 | * Now, do each character | ||
884 | */ | ||
885 | for (i = 0; i < count; i++, s++) { | ||
886 | wait_for_xmitr(up); | ||
887 | |||
888 | /* | ||
889 | * Send the character out. | ||
890 | * If a LF, also do CR... | ||
891 | */ | ||
892 | sio_out(up, TXX9_SITFIFO, *s); | ||
893 | if (*s == 10) { | ||
894 | wait_for_xmitr(up); | ||
895 | sio_out(up, TXX9_SITFIFO, 13); | ||
896 | } | ||
897 | } | ||
898 | 890 | ||
899 | /* | 891 | /* |
900 | * Finally, wait for transmitter to become empty | 892 | * Finally, wait for transmitter to become empty |