diff mbox

[U-Boot] unassigned-patches/149: [PATCH] stm32f4: fix serial output bug

Message ID 20150424164501.94DEF4BAA2@theia.denx.de
State Not Applicable
Headers show

Commit Message

u-boot@bugs.denx.de April 24, 2015, 4:45 p.m. UTC
Signed-off-by: kunhuahuang <huangkunhua@gmail.com>

---
Added to GNATS database as unassigned-patches/149
>Responsible:    patch-coord
>Message-Id:     <1429868904-4779-1-git-send-email-huangkunhua@gmail.com>
>In-Reply-To:    
>References:     
>Patch-Date:     Fri Apr 24 11:48:24 +0200 2015
---
 drivers/serial/serial_stm32.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 3c80096..693a7fa 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -81,6 +81,10 @@  static int stm32_serial_getc(void)
 static void stm32_serial_putc(const char c)
 {
 	struct stm32_serial *usart = (struct stm32_serial *)USART_BASE;
+
+	if(c == '\n')
+		stm32_serial_putc('\r');
+
 	while ((readl(&usart->sr) & USART_SR_FLAG_TXE) == 0)
 		;
 	writel(c, &usart->dr);