]> git.sur5r.net Git - u-boot/blobdiff - drivers/serial/serial_imx.c
sun6i: Add basic axp221 driver
[u-boot] / drivers / serial / serial_imx.c
index d37ec29bd9fc7a9630b7dffc12d0b402d7806d3a..d43a5fedcc87ed782542b88191d4d162b869a481 100644 (file)
@@ -1,20 +1,7 @@
 /*
  * (c) 2004 Sascha Hauer <sascha@saschahauer.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>
@@ -214,21 +201,13 @@ static int imx_serial_tstc(void)
        return 1;
 }
 
-static void imx_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
-#ifdef CONFIG_SERIAL_MULTI
 static struct serial_device imx_serial_drv = {
        .name   = "imx_serial",
        .start  = imx_serial_init,
        .stop   = NULL,
        .setbrg = imx_serial_setbrg,
        .putc   = imx_serial_putc,
-       .puts   = imx_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = imx_serial_getc,
        .tstc   = imx_serial_tstc,
 };
@@ -242,34 +221,3 @@ __weak struct serial_device *default_serial_console(void)
 {
        return &imx_serial_drv;
 }
-#else
-int serial_init(void)
-{
-       return imx_serial_init();
-}
-
-void serial_setbrg(void)
-{
-       imx_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
-       imx_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
-       imx_serial_puts(s);
-}
-
-int serial_getc(void)
-{
-       return imx_serial_getc();
-}
-
-int serial_tstc(void)
-{
-       return imx_serial_tstc();
-}
-#endif