Skip to contentSkip to conversation

debug_uart: output CR along with LF

PATCH New Masahiro Yamada 3 participants 4 messages Mar 8, 2016 – Mar 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 debug_uart: output CR along with LF

The serial output from the debug UART carries on going far to the right in the console.

---

 include/debug_uart.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/debug_uart.h +3 -1
index 5d5349b..0d640b9 100644
@@ -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) \
Signature · 1 line
1.9.1
#3 lore raw

PATCH 1/1 debug_uart: output CR along with LF

Quoted 5 lines · Simon Glass
Quoted 4 lines · Masahiro Yamada

The serial output from the debug UART carries on going far to the right in the console.

Quoted 8 lines
Quoted 5 lines

---

 include/debug_uart.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied to u-boot-dm/next, thanks!