diff options
Diffstat (limited to 'drivers/serial/vr41xx_siu.c')
-rw-r--r-- | drivers/serial/vr41xx_siu.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c index d61494d185cd..3f88b8e81937 100644 --- a/drivers/serial/vr41xx_siu.c +++ b/drivers/serial/vr41xx_siu.c | |||
@@ -821,25 +821,23 @@ static void wait_for_xmitr(struct uart_port *port) | |||
821 | } | 821 | } |
822 | } | 822 | } |
823 | 823 | ||
824 | static void siu_console_putchar(struct uart_port *port, int ch) | ||
825 | { | ||
826 | wait_for_xmitr(port); | ||
827 | siu_write(port, UART_TX, ch); | ||
828 | } | ||
829 | |||
824 | static void siu_console_write(struct console *con, const char *s, unsigned count) | 830 | static void siu_console_write(struct console *con, const char *s, unsigned count) |
825 | { | 831 | { |
826 | struct uart_port *port; | 832 | struct uart_port *port; |
827 | uint8_t ier; | 833 | uint8_t ier; |
828 | unsigned i; | ||
829 | 834 | ||
830 | port = &siu_uart_ports[con->index]; | 835 | port = &siu_uart_ports[con->index]; |
831 | 836 | ||
832 | ier = siu_read(port, UART_IER); | 837 | ier = siu_read(port, UART_IER); |
833 | siu_write(port, UART_IER, 0); | 838 | siu_write(port, UART_IER, 0); |
834 | 839 | ||
835 | for (i = 0; i < count && *s != '\0'; i++, s++) { | 840 | uart_console_write(port, s, count, siu_console_putchar); |
836 | wait_for_xmitr(port); | ||
837 | siu_write(port, UART_TX, *s); | ||
838 | if (*s == '\n') { | ||
839 | wait_for_xmitr(port); | ||
840 | siu_write(port, UART_TX, '\r'); | ||
841 | } | ||
842 | } | ||
843 | 841 | ||
844 | wait_for_xmitr(port); | 842 | wait_for_xmitr(port); |
845 | siu_write(port, UART_IER, ier); | 843 | siu_write(port, UART_IER, ier); |