diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-03-08 18:19:10 +0900 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | b391d743363247bf502fb0b5ca098246ea5a1512 (patch) | |
tree | b355687ed4a1c4084ebbae6364a79e614a582cea | |
parent | 9f56917ab88a6cf02574d0fcd92884edc517d0b4 (diff) | |
download | u-boot-imx-b391d743363247bf502fb0b5ca098246ea5a1512.zip u-boot-imx-b391d743363247bf502fb0b5ca098246ea5a1512.tar.gz u-boot-imx-b391d743363247bf502fb0b5ca098246ea5a1512.tar.bz2 |
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 <yamada.masahiro@socionext.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | include/debug_uart.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/debug_uart.h b/include/debug_uart.h index 5d5349b..0d640b9 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) \ |