[U-Boot] [PATCH] serial: lpc32xx: send CR before LF

Vladimir Zapolskiy vz at mleia.com
Sat Nov 30 15:47:01 CET 2013


For LPC32XX high-speed UART it is required to send a carriage return
symbol along with line feed. The problem was introduced in e503f90a
commit.

Signed-off-by: Vladimir Zapolskiy <vz at mleia.com>
Cc: Marek Vasut <marex at denx.de>
---
 drivers/serial/lpc32xx_hsuart.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 9c7c621..c8926a8 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -38,6 +38,9 @@ static int lpc32xx_serial_getc(void)
 
 static void lpc32xx_serial_putc(const char c)
 {
+	if (c == '\n')
+		serial_putc('\r');
+
 	writel(c, &hsuart->tx);
 
 	/* Wait for character to be sent */
-- 
1.7.10.4



More information about the U-Boot mailing list