]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/serial_mxc.c
send <CRLF> rather than <LFCR> to the serial console
[karo-tx-uboot.git] / drivers / serial / serial_mxc.c
index 56bee55208e0acd0fced0ee0149a404786abc67a..451e9a228f87687d34b6c5502c50ae6808e9bfc6 100644 (file)
@@ -152,15 +152,15 @@ static int mxc_serial_getc(void)
 
 static void mxc_serial_putc(const char c)
 {
+       /* If \n, also do \r */
+       if (c == '\n')
+               serial_putc ('\r');
+
        __REG(UART_PHYS + UTXD) = c;
 
        /* wait for transmitter to be ready */
        while (!(__REG(UART_PHYS + UTS) & UTS_TXEMPTY))
                WATCHDOG_RESET();
-
-       /* If \n, also do \r */
-       if (c == '\n')
-               serial_putc ('\r');
 }
 
 /*