]> git.sur5r.net Git - u-boot/blobdiff - drivers/serial/serial_mxc.c
dw_mmc: cleanups
[u-boot] / drivers / serial / serial_mxc.c
index b0612f5aca935a492f97a7efe7542e1ebaf9a9c9..313d560afce8635f3b1f29c3ea029173b69f8c40 100644 (file)
@@ -1,20 +1,7 @@
 /*
  * (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -90,7 +77,7 @@
 #define  UCR3_DSR        (1<<10) /* Data set ready */
 #define  UCR3_DCD        (1<<9)  /* Data carrier detect */
 #define  UCR3_RI         (1<<8)  /* Ring indicator */
-#define  UCR3_TIMEOUTEN  (1<<7)  /* Timeout interrupt enable */
+#define  UCR3_ADNIMP     (1<<7)  /* Autobaud Detection Not Improved */
 #define  UCR3_RXDSEN    (1<<6)  /* Receive status interrupt enable */
 #define  UCR3_AIRINTEN   (1<<5)  /* Async IR wake interrupt enable */
 #define  UCR3_AWAKEN    (1<<4)  /* Async wake interrupt enable */
@@ -187,13 +174,6 @@ static int mxc_serial_tstc(void)
        return 1;
 }
 
-static void mxc_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 /*
  * Initialise the serial port with the given baudrate. The settings
  * are always 8 data bits, no parity, 1 stop bit, no start bits.
@@ -206,7 +186,7 @@ static int mxc_serial_init(void)
 
        while (!(__REG(UART_PHYS + UCR2) & UCR2_SRST));
 
-       __REG(UART_PHYS + UCR3) = 0x0704;
+       __REG(UART_PHYS + UCR3) = 0x0704 | UCR3_ADNIMP;
        __REG(UART_PHYS + UCR4) = 0x8000;
        __REG(UART_PHYS + UESC) = 0x002b;
        __REG(UART_PHYS + UTIM) = 0x0;
@@ -228,7 +208,7 @@ static struct serial_device mxc_serial_drv = {
        .stop   = NULL,
        .setbrg = mxc_serial_setbrg,
        .putc   = mxc_serial_putc,
-       .puts   = mxc_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mxc_serial_getc,
        .tstc   = mxc_serial_tstc,
 };