aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_txx9.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 20:33:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 20:33:12 -0500
commit9d8f057acbd38d8177cf2ffd5e151d52c2477372 (patch)
tree1c3387b045a8a487ff99bf3abed1cdf41670f6e6 /drivers/serial/serial_txx9.c
parent591eb85ecd7e6eb8596c6129ae074e16636b99f4 (diff)
parent91bca4b3e2f1aaaf67e62a36914f33ca1e7d5a06 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial: [SERIAL] Merge avlab serial board entries in parport_serial [SERIAL] kernel console should send CRLF not LFCR
Diffstat (limited to 'drivers/serial/serial_txx9.c')
-rw-r--r--drivers/serial/serial_txx9.c26
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
866static 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