]> git.sur5r.net Git - u-boot/commitdiff
dm: serial: Remove duplicated carriage return character
authorAlison Wang <b18965@freescale.com>
Wed, 2 Mar 2016 03:00:38 +0000 (11:00 +0800)
committerSimon Glass <sjg@chromium.org>
Mon, 14 Mar 2016 21:34:50 +0000 (15:34 -0600)
As the handling for carriage return and line feed is done in the common
DM driver serial-uclass.c, such handling in some serial DM drivers is
duplicated and need to be removed.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/serial/serial_arc.c
drivers/serial/serial_lpuart.c

index 7dbb49f81464c1dffbc949c91e88000da3bc0691..6292eb136b0d86590d7508d6b26260afe41bfbca 100644 (file)
@@ -68,9 +68,6 @@ static int arc_serial_putc(struct udevice *dev, const char c)
        struct arc_serial_platdata *plat = dev->platdata;
        struct arc_serial_regs *const regs = plat->reg;
 
-       if (c == '\n')
-               arc_serial_putc(dev, '\r');
-
        while (!(readb(&regs->status) & UART_TXEMPTY))
                ;
 
index fc3321fda05d2d7b2f64c53721392917a95d2a71..042e9a26d1cb52114085a29685337a8891bb9cc3 100644 (file)
@@ -77,9 +77,6 @@ static int _lpuart_serial_getc(struct lpuart_fsl *base)
 
 static void _lpuart_serial_putc(struct lpuart_fsl *base, const char c)
 {
-       if (c == '\n')
-               _lpuart_serial_putc(base, '\r');
-
        while (!(__raw_readb(&base->us1) & US1_TDRE))
                WATCHDOG_RESET();
 
@@ -198,9 +195,6 @@ static int _lpuart32_serial_getc(struct lpuart_fsl *base)
 
 static void _lpuart32_serial_putc(struct lpuart_fsl *base, const char c)
 {
-       if (c == '\n')
-               _lpuart32_serial_putc(base, '\r');
-
        while (!(in_be32(&base->stat) & STAT_TDRE))
                WATCHDOG_RESET();