From: Masahiro Yamada Date: Tue, 8 Mar 2016 09:19:10 +0000 (+0900) Subject: debug_uart: output CR along with LF X-Git-Tag: v2016.05-rc1~420^2~37 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b391d743363247bf502fb0b5ca098246ea5a1512;hp=9f56917ab88a6cf02574d0fcd92884edc517d0b4;p=oweals%2Fu-boot.git debug_uart: output CR along with LF The serial output from the debug UART carries on going far to the right in the console. Signed-off-by: Masahiro Yamada Reviewed-by: Stefan Roese Reviewed-by: Simon Glass --- diff --git a/include/debug_uart.h b/include/debug_uart.h index 5d5349bbd2..0d640b96e7 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -117,13 +117,15 @@ void printhex8(uint value); #define DEBUG_UART_FUNCS \ void printch(int ch) \ { \ + if (ch == '\n') \ + _debug_uart_putc('\r'); \ _debug_uart_putc(ch); \ } \ \ void printascii(const char *str) \ { \ while (*str) \ - _debug_uart_putc(*str++); \ + printch(*str++); \ } \ \ static inline void printhex1(uint digit) \