diff options
Diffstat (limited to 'drivers/serial/pxa.c')
-rw-r--r-- | drivers/serial/pxa.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 10535f00301f..77d4568ccc3a 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -619,6 +619,14 @@ static inline void wait_for_xmitr(struct uart_pxa_port *up) | |||
619 | } | 619 | } |
620 | } | 620 | } |
621 | 621 | ||
622 | static void serial_pxa_console_putchar(struct uart_port *port, int ch) | ||
623 | { | ||
624 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; | ||
625 | |||
626 | wait_for_xmitr(up); | ||
627 | serial_out(up, UART_TX, ch); | ||
628 | } | ||
629 | |||
622 | /* | 630 | /* |
623 | * Print a string to the serial port trying not to disturb | 631 | * Print a string to the serial port trying not to disturb |
624 | * any possible real use of the port... | 632 | * any possible real use of the port... |
@@ -630,7 +638,6 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) | |||
630 | { | 638 | { |
631 | struct uart_pxa_port *up = &serial_pxa_ports[co->index]; | 639 | struct uart_pxa_port *up = &serial_pxa_ports[co->index]; |
632 | unsigned int ier; | 640 | unsigned int ier; |
633 | int i; | ||
634 | 641 | ||
635 | /* | 642 | /* |
636 | * First save the IER then disable the interrupts | 643 | * First save the IER then disable the interrupts |
@@ -638,22 +645,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) | |||
638 | ier = serial_in(up, UART_IER); | 645 | ier = serial_in(up, UART_IER); |
639 | serial_out(up, UART_IER, UART_IER_UUE); | 646 | serial_out(up, UART_IER, UART_IER_UUE); |
640 | 647 | ||
641 | /* | 648 | uart_console_write(&up->port, s, count, serial_pxa_console_putchar); |
642 | * Now, do each character | ||
643 | */ | ||
644 | for (i = 0; i < count; i++, s++) { | ||
645 | wait_for_xmitr(up); | ||
646 | |||
647 | /* | ||
648 | * Send the character out. | ||
649 | * If a LF, also do CR... | ||
650 | */ | ||
651 | serial_out(up, UART_TX, *s); | ||
652 | if (*s == 10) { | ||
653 | wait_for_xmitr(up); | ||
654 | serial_out(up, UART_TX, 13); | ||
655 | } | ||
656 | } | ||
657 | 649 | ||
658 | /* | 650 | /* |
659 | * Finally, wait for transmitter to become empty | 651 | * Finally, wait for transmitter to become empty |