]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/serial_pxa.c
Merge branch 'master' of git://git.denx.de/u-boot-x86
[karo-tx-uboot.git] / drivers / serial / serial_pxa.c
index d5140045bfbb54ee0d790418fe07b7cbb4655343..1eb19ececdfdd514a6d59e6a25ee01507dfaaab8 100644 (file)
  */
 
 #include <common.h>
-#include <watchdog.h>
-#include <serial.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/regs-uart.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
+#include <serial.h>
+#include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -156,6 +156,10 @@ void pxa_putc_dev(unsigned int uart_index, const char c)
 {
        struct pxa_uart_regs *uart_regs;
 
+       /* If \n, also do \r */
+       if (c == '\n')
+               pxa_putc_dev(uart_index, '\r');
+
        uart_regs = pxa_uart_index_to_regs(uart_index);
        if (!uart_regs)
                hang();
@@ -163,10 +167,6 @@ void pxa_putc_dev(unsigned int uart_index, const char c)
        while (!(readl(&uart_regs->lsr) & LSR_TEMT))
                WATCHDOG_RESET();
        writel(c, &uart_regs->thr);
-
-       /* If \n, also do \r */
-       if (c == '\n')
-               pxa_putc_dev (uart_index,'\r');
 }
 
 /*