Revert "Revert "stm32f4: fix serial output""
authorTom Rini <trini@konsulko.com>
Wed, 27 May 2015 17:24:10 +0000 (13:24 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 27 May 2015 17:24:10 +0000 (13:24 -0400)
Due to a misunderstanding, in 698a12b we reverted changes that we in
fact wanted to keep.  So lets fix that mistake and bring the code back
to how it should have been.

This reverts commit 698a12bef9e782dcd99c555a739c16eec8669f14.

Signed-off-by: Tom Rini <trini@konsulko.com>
drivers/serial/serial_stm32.c

index 1b22c692d2ca3e1268bee7e9be5c5f122a5a20bd..8b2830b946a83b9bf3675c4fef03d2c8fc815882 100644 (file)
@@ -128,6 +128,9 @@ static void stm32_serial_putc(const char c)
        struct stm32_serial *usart =
                (struct stm32_serial *)usart_base[USART_PORT];
 
+       if (c == '\n')
+               stm32_serial_putc('\r');
+
        while ((readl(&usart->sr) & USART_SR_FLAG_TXE) == 0)
                ;
        writel(c, &usart->dr);