serial: lpc32xx: send CR before LF
authorVladimir Zapolskiy <vz@mleia.com>
Sat, 30 Nov 2013 14:47:01 +0000 (16:47 +0200)
committerTom Rini <trini@ti.com>
Fri, 13 Dec 2013 14:14:34 +0000 (09:14 -0500)
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@mleia.com>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
drivers/serial/lpc32xx_hsuart.c

index 9c7c621..c8926a8 100644 (file)
@@ -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 */