summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_stm32.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-27 13:24:10 -0400
committerTom Rini <trini@konsulko.com>2015-05-27 13:24:10 -0400
commit445614cc2fbbbdb2be32663b7ba0927ac99cb353 (patch)
tree046f7da7e69b6ad711dd60d4c7629435152f541e /drivers/serial/serial_stm32.c
parent2e2ce6c0c8d3d0d2a86d2464d201aecd9aef693d (diff)
downloadu-boot-imx-445614cc2fbbbdb2be32663b7ba0927ac99cb353.zip
u-boot-imx-445614cc2fbbbdb2be32663b7ba0927ac99cb353.tar.gz
u-boot-imx-445614cc2fbbbdb2be32663b7ba0927ac99cb353.tar.bz2
Revert "Revert "stm32f4: fix serial output""
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>
Diffstat (limited to 'drivers/serial/serial_stm32.c')
-rw-r--r--drivers/serial/serial_stm32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 1b22c69..8b2830b 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -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);