]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/serial_mxc.c
karo: tx6: configure all pads with explicit pad_ctl values
[karo-tx-uboot.git] / drivers / serial / serial_mxc.c
index 9ce24f9f932d932f6244479241809b8858a696a4..a9ca92107156e8901ae74f9ef0e6b0906fa380ee 100644 (file)
@@ -7,10 +7,10 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
-#include <serial_mxc.h>
 #include <watchdog.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
+#include <dm/platform_data/serial_mxc.h>
 #include <serial.h>
 #include <linux/compiler.h>
 
@@ -157,15 +157,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');
 }
 
 /*