diff options
Diffstat (limited to 'drivers/serial/m32r_sio.c')
-rw-r--r-- | drivers/serial/m32r_sio.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index 242a04104393..876bc5e027bb 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c | |||
@@ -1039,6 +1039,14 @@ static inline void wait_for_xmitr(struct uart_sio_port *up) | |||
1039 | } | 1039 | } |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | static void m32r_sio_console_putchar(struct uart_port *port, int ch) | ||
1043 | { | ||
1044 | struct uart_sio_port *up = (struct uart_sio_port *)port; | ||
1045 | |||
1046 | wait_for_xmitr(up); | ||
1047 | sio_out(up, SIOTXB, ch); | ||
1048 | } | ||
1049 | |||
1042 | /* | 1050 | /* |
1043 | * Print a string to the serial port trying not to disturb | 1051 | * Print a string to the serial port trying not to disturb |
1044 | * any possible real use of the port... | 1052 | * any possible real use of the port... |
@@ -1058,23 +1066,7 @@ static void m32r_sio_console_write(struct console *co, const char *s, | |||
1058 | ier = sio_in(up, SIOTRCR); | 1066 | ier = sio_in(up, SIOTRCR); |
1059 | sio_out(up, SIOTRCR, 0); | 1067 | sio_out(up, SIOTRCR, 0); |
1060 | 1068 | ||
1061 | /* | 1069 | uart_console_write(&up->port, s, count, m32r_sio_console_putchar); |
1062 | * Now, do each character | ||
1063 | */ | ||
1064 | for (i = 0; i < count; i++, s++) { | ||
1065 | wait_for_xmitr(up); | ||
1066 | |||
1067 | /* | ||
1068 | * Send the character out. | ||
1069 | * If a LF, also do CR... | ||
1070 | */ | ||
1071 | sio_out(up, SIOTXB, *s); | ||
1072 | |||
1073 | if (*s == 10) { | ||
1074 | wait_for_xmitr(up); | ||
1075 | sio_out(up, SIOTXB, 13); | ||
1076 | } | ||
1077 | } | ||
1078 | 1070 | ||
1079 | /* | 1071 | /* |
1080 | * Finally, wait for transmitter to become empty | 1072 | * Finally, wait for transmitter to become empty |