]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: Use default_serial_puts() in drivers
authorMarek Vasut <marex@denx.de>
Sat, 6 Oct 2012 14:07:02 +0000 (14:07 +0000)
committerTom Rini <trini@ti.com>
Wed, 17 Oct 2012 14:55:50 +0000 (07:55 -0700)
Replace the in-place ad-hoc implementation of serial_puts() within
the drivers with default_serial_puts() call. This cuts down on the
code duplication quite a bit.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
39 files changed:
arch/mips/cpu/mips32/au1x00/au1x00_serial.c
arch/mips/cpu/mips32/incaip/asc_serial.c
arch/mips/cpu/xburst/jz_serial.c
arch/powerpc/cpu/mpc5xx/serial.c
arch/powerpc/cpu/mpc8220/uart.c
arch/powerpc/cpu/mpc8260/serial_scc.c
arch/powerpc/cpu/mpc8260/serial_smc.c
arch/powerpc/cpu/mpc85xx/serial_scc.c
arch/sparc/cpu/leon2/serial.c
arch/sparc/cpu/leon3/serial.c
board/Marvell/common/serial.c
board/cogent/serial.c
board/esd/cpci750/serial.c
board/evb64260/serial.c
board/pcippc2/fpga_serial.c
board/pcippc2/fpga_serial.h
board/pcippc2/pcippc2.c
board/prodrive/p3mx/serial.c
drivers/serial/altera_jtag_uart.c
drivers/serial/altera_uart.c
drivers/serial/atmel_usart.c
drivers/serial/lpc32xx_hsuart.c
drivers/serial/mcfuart.c
drivers/serial/ns9750_serial.c
drivers/serial/opencores_yanu.c
drivers/serial/s3c4510b_uart.c
drivers/serial/s3c64xx.c
drivers/serial/serial_clps7111.c
drivers/serial/serial_imx.c
drivers/serial/serial_ixp.c
drivers/serial/serial_ks8695.c
drivers/serial/serial_lh7a40x.c
drivers/serial/serial_lpc2292.c
drivers/serial/serial_mxc.c
drivers/serial/serial_netarm.c
drivers/serial/serial_pl01x.c
drivers/serial/serial_s3c44b0.c
drivers/serial/serial_sa1100.c
drivers/serial/serial_sh.c

index 0beac98fdeb7bc1ce9b1e60ffccf42567b9e4dfc..3e85b90cded451b709da8dc795b164e8e8a34ab1 100644 (file)
@@ -103,12 +103,6 @@ static void au1x00_serial_putc(const char c)
        *uart_tx = (u32)c;
 }
 
-static void au1x00_serial_puts(const char *s)
-{
-       while (*s)
-               serial_putc(*s++);
-}
-
 static int au1x00_serial_getc(void)
 {
        volatile u32 *uart_rx = (volatile u32*)(UART0_ADDR+UART_RX);
@@ -137,7 +131,7 @@ static struct serial_device au1x00_serial_drv = {
        .stop   = NULL,
        .setbrg = au1x00_serial_setbrg,
        .putc   = au1x00_serial_putc,
-       .puts   = au1x00_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = au1x00_serial_getc,
        .tstc   = au1x00_serial_tstc,
 };
index 08949f4fb05d39ca77812c0a37b6ea86e5091f55..6f0e4f2520143a2909ff73585f2d1576b9a276da 100644 (file)
@@ -236,14 +236,6 @@ static void asc_serial_putc(const char c)
     }
 }
 
-static void asc_serial_puts(const char *s)
-{
-    while (*s)
-    {
-       serial_putc (*s++);
-    }
-}
-
 static int asc_serial_getc(void)
 {
     ulong symbol_mask;
@@ -292,7 +284,7 @@ static struct serial_device asc_serial_drv = {
        .stop   = NULL,
        .setbrg = asc_serial_setbrg,
        .putc   = asc_serial_putc,
-       .puts   = asc_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = asc_serial_getc,
        .tstc   = asc_serial_tstc,
 };
index 319900775752e9ac5b652197dda5001aaeed0c51..a14765735020255d48b05a17953bcc7b8c29165b 100644 (file)
@@ -109,19 +109,13 @@ static int jz_serial_getc(void)
        return readb(&uart->rbr_thr_dllr);
 }
 
-static void jz_serial_puts(const char *s)
-{
-       while (*s)
-               serial_putc(*s++);
-}
-
 static struct serial_device jz_serial_drv = {
        .name   = "jz_serial",
        .start  = jz_serial_init,
        .stop   = NULL,
        .setbrg = jz_serial_setbrg,
        .putc   = jz_serial_putc,
-       .puts   = jz_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = jz_serial_getc,
        .tstc   = jz_serial_tstc,
 };
index 6ef8be8fac2677fa77d387989c58fc415cf04211..732856a5c57106ddc6e2e4e09b6e41680bbffa56 100644 (file)
@@ -161,21 +161,13 @@ static void mpc5xx_serial_setbrg(void)
 #endif
 }
 
-static void mpc5xx_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc(*s);
-               ++s;
-       }
-}
-
 static struct serial_device mpc5xx_serial_drv = {
        .name   = "mpc5xx_serial",
        .start  = mpc5xx_serial_init,
        .stop   = NULL,
        .setbrg = mpc5xx_serial_setbrg,
        .putc   = mpc5xx_serial_putc,
-       .puts   = mpc5xx_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mpc5xx_serial_getc,
        .tstc   = mpc5xx_serial_tstc,
 };
index 25d4472ea04b13f68b760e48527c078229f040f2..772528f82c372dcad26a4a11dcae4a6c94ee65da 100644 (file)
@@ -84,13 +84,6 @@ static void mpc8220_serial_putc(const char c)
        psc->xmitbuf[0] = c;
 }
 
-static void mpc8220_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static int mpc8220_serial_getc(void)
 {
        volatile psc8220_t *psc = (psc8220_t *) PSC_BASE;
@@ -132,7 +125,7 @@ static struct serial_device mpc8220_serial_drv = {
        .stop   = NULL,
        .setbrg = mpc8220_serial_setbrg,
        .putc   = mpc8220_serial_putc,
-       .puts   = mpc8220_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mpc8220_serial_getc,
        .tstc   = mpc8220_serial_tstc,
 };
index ab7755824a9537675b6f244916cd12c2a16efac7..ab2a2b29cb57b140f8a56d69ab4941a83f402dbc 100644 (file)
@@ -217,13 +217,6 @@ static void mpc8260_scc_serial_putc(const char c)
        tbdf->cbd_sc |= BD_SC_READY;
 }
 
-static void mpc8260_scc_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static int mpc8260_scc_serial_getc(void)
 {
        volatile cbd_t          *rbdf;
@@ -267,7 +260,7 @@ static struct serial_device mpc8260_scc_serial_drv = {
        .stop   = NULL,
        .setbrg = mpc8260_scc_serial_setbrg,
        .putc   = mpc8260_scc_serial_putc,
-       .puts   = mpc8260_scc_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mpc8260_scc_serial_getc,
        .tstc   = mpc8260_scc_serial_tstc,
 };
index 7edde9a492ba8d578724c8630a8a7d85a43fe3d6..feba1f63d260b3a1465e6a2f742b7db23df94a8e 100644 (file)
@@ -216,13 +216,6 @@ static void mpc8260_smc_serial_putc(const char c)
        rtx->txbd.cbd_sc |= BD_SC_READY;
 }
 
-static void mpc8260_smc_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static int mpc8260_smc_serial_getc(void)
 {
        volatile smc_uart_t     *up;
@@ -270,7 +263,7 @@ static struct serial_device mpc8260_smc_serial_drv = {
        .stop   = NULL,
        .setbrg = mpc8260_smc_serial_setbrg,
        .putc   = mpc8260_smc_serial_putc,
-       .puts   = mpc8260_smc_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mpc8260_smc_serial_getc,
        .tstc   = mpc8260_smc_serial_tstc,
 };
index fe9af55c7a564030041869ceb82e33f89e880e0a..6345362d8859ce101574a48f1b6c9c5348f6735e 100644 (file)
@@ -220,13 +220,6 @@ static void mpc85xx_serial_putc(const char c)
        tbdf->cbd_sc |= BD_SC_READY;
 }
 
-static void mpc85xx_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static int mpc85xx_serial_getc(void)
 {
        volatile cbd_t          *rbdf;
@@ -268,7 +261,7 @@ static struct serial_device mpc85xx_serial_drv = {
        .stop   = NULL,
        .setbrg = mpc85xx_serial_setbrg,
        .putc   = mpc85xx_serial_putc,
-       .puts   = mpc85xx_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mpc85xx_serial_getc,
        .tstc   = mpc85xx_serial_tstc,
 };
index 16fffb621dd757a3a51afca60ff9f092e7d74bd6..40d5b01d2710af86750efd0d342ac0214fa7c6c1 100644 (file)
@@ -105,13 +105,6 @@ static void leon2_serial_putc(const char c)
        leon2_serial_putc_raw(c);
 }
 
-static void leon2_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc(*s++);
-       }
-}
-
 static int leon2_serial_getc(void)
 {
        LEON2_regs *leon2 = (LEON2_regs *) LEON2_PREGS;
@@ -172,7 +165,7 @@ static struct serial_device leon2_serial_drv = {
        .stop   = NULL,
        .setbrg = leon2_serial_setbrg,
        .putc   = leon2_serial_putc,
-       .puts   = leon2_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = leon2_serial_getc,
        .tstc   = leon2_serial_tstc,
 };
index c4f3ee83c3399ee7c2027150a27c6ae9aad0b1d7..838d4514eeb2ff4d794e2782468a522db688420f 100644 (file)
@@ -99,13 +99,6 @@ static void leon3_serial_putc(const char c)
        leon3_serial_putc_raw(c);
 }
 
-static void leon3_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc(*s++);
-       }
-}
-
 static int leon3_serial_getc(void)
 {
        if (!leon3_apbuart)
@@ -146,7 +139,7 @@ static struct serial_device leon3_serial_drv = {
        .stop   = NULL,
        .setbrg = leon3_serial_setbrg,
        .putc   = leon3_serial_putc,
-       .puts   = leon3_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = leon3_serial_getc,
        .tstc   = leon3_serial_tstc,
 };
index 1327c62a75af7fa23c1c65ad6e601fd4c53ccceb..4a780c3746bd591cd6de6a2bf12d59e5de4d154a 100644 (file)
@@ -139,20 +139,13 @@ static void marvell_serial_setbrg(void)
 
 #endif /* CONFIG_MPSC */
 
-static void marvell_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device marvell_serial_drv = {
        .name   = "marvell_serial",
        .start  = marvell_serial_init,
        .stop   = NULL,
        .setbrg = marvell_serial_setbrg,
        .putc   = marvell_serial_putc,
-       .puts   = marvell_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = marvell_serial_getc,
        .tstc   = marvell_serial_tstc,
 };
index cd4a976f89e23b4da23e84c58f1d8502802e6c84..20631d162dd72ea5b623495927d2d31fc01dbfa9 100644 (file)
@@ -68,12 +68,6 @@ static void cogent_serial_putc(const char c)
        cma_mb_reg_write (&mbsp->ser_thr, c);
 }
 
-static void cogent_serial_puts(const char *s)
-{
-       while (*s != '\0')
-               serial_putc (*s++);
-}
-
 static int cogent_serial_getc(void)
 {
        cma_mb_serial *mbsp = (cma_mb_serial *) CMA_MB_SERIAL_BASE;
@@ -96,7 +90,7 @@ static struct serial_device cogent_serial_drv = {
        .stop   = NULL,
        .setbrg = cogent_serial_setbrg,
        .putc   = cogent_serial_putc,
-       .puts   = cogent_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = cogent_serial_getc,
        .tstc   = cogent_serial_tstc,
 };
index 25f8950e9adc7f5e84fd62fb003d122e469ad476..160e0e0ae02f491afe15294dd42f49c04db70309 100644 (file)
@@ -75,21 +75,13 @@ static void cpci750_serial_setbrg(void)
        galbrg_set_baudrate (CONFIG_MPSC_PORT, gd->baudrate);
 }
 
-
-static void cpci750_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device cpci750_serial_drv = {
        .name   = "cpci750_serial",
        .start  = cpci750_serial_init,
        .stop   = NULL,
        .setbrg = cpci750_serial_setbrg,
        .putc   = cpci750_serial_putc,
-       .puts   = cpci750_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = cpci750_serial_getc,
        .tstc   = cpci750_serial_tstc,
 };
index 9fd429864a7c9e027806ea0bb9382167b43b3bf3..b9ca1d760c0cbddb5f96d95883657244ad15579b 100644 (file)
@@ -139,20 +139,13 @@ static void evb64260_serial_setbrg(void)
 
 #endif /* CONFIG_MPSC */
 
-static void evb64260_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device evb64260_serial_drv = {
        .name   = "evb64260_serial",
        .start  = evb64260_serial_init,
        .stop   = NULL,
        .setbrg = evb64260_serial_setbrg,
        .putc   = evb64260_serial_putc,
-       .puts   = evb64260_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = evb64260_serial_getc,
        .tstc   = evb64260_serial_tstc,
 };
index 5f89d9b125e105d71aa2e968cba8459cc28f2983..de61ca0e560731afde82c875e44f43d6ff1ce2b9 100644 (file)
@@ -73,13 +73,6 @@ void fpga_serial_putc (char c)
        }
 }
 
-void fpga_serial_puts (const char *s)
-{
-       while (*s) {
-               fpga_serial_print (*s++);
-       }
-}
-
 int fpga_serial_getc (void)
 {
        while ((in8 (UART (LSR)) & 0x01) == 0);
index 52750143c4495c1934e0ce0f44b7351c2372a69c..106fbf7a500cfb0b0299827aa2ddb84751227372 100644 (file)
@@ -26,7 +26,6 @@
 
 extern void    fpga_serial_init        (int);
 extern void    fpga_serial_putc        (char);
-extern void    fpga_serial_puts        (const char *);
 extern int     fpga_serial_getc        (void);
 extern int     fpga_serial_tstc        (void);
 extern void    fpga_serial_setbrg      (void);
index 4a91458e8e6a6b2c008d5d095ed08c908579d8b7..5e6fc58cf76002f3c36f4ab1a886734a2220be34 100644 (file)
@@ -29,6 +29,7 @@
 #include <watchdog.h>
 #include <pci.h>
 #include <netdev.h>
+#include <serial.h>
 
 #include "hardware.h"
 #include "pcippc2.h"
@@ -129,7 +130,7 @@ int misc_init_r (void)
        fpga_serial_init (sconsole_get_baudrate ());
 
        sconsole_putc   = fpga_serial_putc;
-       sconsole_puts   = fpga_serial_puts;
+       sconsole_puts   = default_serial_puts;
        sconsole_getc   = fpga_serial_getc;
        sconsole_tstc   = fpga_serial_tstc;
        sconsole_setbrg = fpga_serial_setbrg;
index 2f4d294b9d24e80155aec169a99266a8a49272d4..3536933c0011a80a195309a35e2ac19e36a3f2c5 100644 (file)
@@ -75,21 +75,13 @@ static void p3mx_serial_setbrg(void)
        galbrg_set_baudrate (CONFIG_MPSC_PORT, gd->baudrate);
 }
 
-
-static void p3mx_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device p3mx_serial_drv = {
        .name   = "p3mx_serial",
        .start  = p3mx_serial_init,
        .stop   = NULL,
        .setbrg = p3mx_serial_setbrg,
        .putc   = p3mx_serial_putc,
-       .puts   = p3mx_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = p3mx_serial_getc,
        .tstc   = p3mx_serial_tstc,
 };
index 654b5019eba07d2d8496f003a17756d71f1700e2..28319baf187fae15ee030486f34e0c442cf07a2a 100644 (file)
@@ -59,12 +59,6 @@ static void altera_jtag_serial_putc(char c)
        writel ((unsigned char)c, &jtag->data);
 }
 
-static void altera_jtag_serial_puts(const char *s)
-{
-       while (*s != 0)
-               serial_putc (*s++);
-}
-
 static int altera_jtag_serial_tstc(void)
 {
        return ( readl (&jtag->control) & NIOS_JTAG_RRDY);
@@ -91,7 +85,7 @@ static struct serial_device altera_jtag_serial_drv = {
        .stop   = NULL,
        .setbrg = altera_jtag_serial_setbrg,
        .putc   = altera_jtag_serial_putc,
-       .puts   = altera_jtag_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = altera_jtag_serial_getc,
        .tstc   = altera_jtag_serial_tstc,
 };
index 27550ed48dbaf64fa8f7f9fb8ea33dd9a992207b..118cd58ece85e6e6fb9102cb3ec7c78157f3488d 100644 (file)
@@ -82,13 +82,6 @@ static void altera_serial_putc(char c)
        writel ((unsigned char)c, &uart->txdata);
 }
 
-static void altera_serial_puts(const char *s)
-{
-       while (*s != 0) {
-               serial_putc (*s++);
-       }
-}
-
 static int altera_serial_tstc(void)
 {
        return (readl (&uart->status) & NIOS_UART_RRDY);
@@ -107,7 +100,7 @@ static struct serial_device altera_serial_drv = {
        .stop   = NULL,
        .setbrg = altera_serial_setbrg,
        .putc   = altera_serial_putc,
-       .puts   = altera_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = altera_serial_getc,
        .tstc   = altera_serial_tstc,
 };
index 130303129e868d2991bde9035abf2fc9b470c821..c4d7432efc688985b7515bab0f2ef2de2683eaf6 100644 (file)
@@ -86,12 +86,6 @@ static void atmel_serial_putc(char c)
        writel(c, &usart->thr);
 }
 
-static void atmel_serial_puts(const char *s)
-{
-       while (*s)
-               serial_putc(*s++);
-}
-
 static int atmel_serial_getc(void)
 {
        atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_USART_BASE;
@@ -113,7 +107,7 @@ static struct serial_device atmel_serial_drv = {
        .stop   = NULL,
        .setbrg = atmel_serial_setbrg,
        .putc   = atmel_serial_putc,
-       .puts   = atmel_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = atmel_serial_getc,
        .tstc   = atmel_serial_tstc,
 };
index 02429b554163e1952f7e8c118e33379422412788..75599165781f1d48d216f118bffa8166d2d71c51 100644 (file)
@@ -77,19 +77,13 @@ static int lpc32xx_serial_init(void)
        return 0;
 }
 
-static void lpc32xx_serial_puts(const char *s)
-{
-       while (*s)
-               serial_putc(*s++);
-}
-
 static struct serial_device lpc32xx_serial_drv = {
        .name   = "lpc32xx_serial",
        .start  = lpc32xx_serial_init,
        .stop   = NULL,
        .setbrg = lpc32xx_serial_setbrg,
        .putc   = lpc32xx_serial_putc,
-       .puts   = lpc32xx_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = lpc32xx_serial_getc,
        .tstc   = lpc32xx_serial_tstc,
 };
index 00a7114691112a31a127f193efe725d11e063335..8ea9af0f610e20359e3f7253e5e2bd4e77222776 100644 (file)
@@ -87,13 +87,6 @@ static void mcf_serial_putc(const char c)
        uart->utb = c;
 }
 
-static void mcf_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc(*s++);
-       }
-}
-
 static int mcf_serial_getc(void)
 {
        volatile uart_t *uart = (volatile uart_t *)(CONFIG_SYS_UART_BASE);
@@ -136,7 +129,7 @@ static struct serial_device mcf_serial_drv = {
        .stop   = NULL,
        .setbrg = mcf_serial_setbrg,
        .putc   = mcf_serial_putc,
-       .puts   = mcf_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = mcf_serial_getc,
        .tstc   = mcf_serial_tstc,
 };
index cb545c4065781e16bd2529d225c13c4ed6e49e37..85fc68a07609bf0b7e04a3ba01fbaba6416ee1b6 100644 (file)
@@ -99,19 +99,6 @@ static void ns9750_serial_putc(const char c)
                                                    CONSOLE) = c;
 }
 
-/***********************************************************************
- * @Function: serial_puts
- * @Return: n/a
- * @Descr: writes non-zero string to the FIFO.
- ***********************************************************************/
-
-static void ns9750_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc( *s++ );
-       }
-}
-
 /***********************************************************************
  * @Function: serial_getc
  * @Return: the character read
@@ -215,7 +202,7 @@ static struct serial_device ns9750_serial_drv = {
        .stop   = NULL,
        .setbrg = ns9750_serial_setbrg,
        .putc   = ns9750_serial_putc,
-       .puts   = ns9750_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = ns9750_serial_getc,
        .tstc   = ns9750_serial_tstc,
 };
index 49bccf3a6cdaf56b3b4f688de6e24ac92682aca1..4ca6ef0b252008834c834f2e0e332cead86170ab 100644 (file)
@@ -161,14 +161,6 @@ static void oc_serial_putc(char c)
        writel((unsigned char)c, &uart->data);
 }
 
-static void oc_serial_puts(const char *s)
-{
-       while (*s != 0) {
-               serial_putc (*s++);
-       }
-}
-
-
 static int oc_serial_tstc(void)
 {
        unsigned status ;
@@ -195,7 +187,7 @@ static struct serial_device oc_serial_drv = {
        .stop   = NULL,
        .setbrg = oc_serial_setbrg,
        .putc   = oc_serial_putc,
-       .puts   = oc_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = oc_serial_getc,
        .tstc   = oc_serial_tstc,
 };
index 423d26e67883d2e357f652e503bf7278e8107dd1..c460229e057674bb4c61b1a22304fd397986e462 100644 (file)
@@ -199,12 +199,10 @@ static int s3c4510b_serial_getc(void)
 
 static void s3c4510b_serial_puts(const char *s)
 {
-       while (*s) {
-               serial_putc (*s++);
-       }
+       default_serial_puts(s);
 
        /* busy wait for tx complete */
-       while ( !uart->m_stat.bf.txComplete);
+       while (!uart->m_stat.bf.txComplete);
 
        /* clear break */
        uart->m_ctrl.bf.sendBreak = 0;
index 9ab8a28d838c96e1126e08cde4db0b9c7f562c6f..ea8d734a9ed6769a945f1c10c287f32d23339b08 100644 (file)
@@ -166,19 +166,13 @@ static int s3c64xx_serial_tstc(void)
        return uart->UTRSTAT & 0x1;
 }
 
-static void s3c64xx_serial_puts(const char *s)
-{
-       while (*s)
-               serial_putc(*s++);
-}
-
 static struct serial_device s3c64xx_serial_drv = {
        .name   = "s3c64xx_serial",
        .start  = s3c64xx_serial_init,
        .stop   = NULL,
        .setbrg = s3c64xx_serial_setbrg,
        .putc   = s3c64xx_serial_putc,
-       .puts   = s3c64xx_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = s3c64xx_serial_getc,
        .tstc   = s3c64xx_serial_tstc,
 };
index 65473e860801df994762d333fa78880590e887e2..c292ed875607a663c6ec1bb1a6018ff3356f6d57 100644 (file)
@@ -112,20 +112,13 @@ static int clps7111_serial_getc(void)
        return IO_UARTDR1 & 0xff;
 }
 
-static void clps7111_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device clps7111_serial_drv = {
        .name   = "clps7111_serial",
        .start  = clps7111_serial_init,
        .stop   = NULL,
        .setbrg = clps7111_serial_setbrg,
        .putc   = clps7111_serial_putc,
-       .puts   = clps7111_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = clps7111_serial_getc,
        .tstc   = clps7111_serial_tstc,
 };
index 6c075b5b912300cba1d0817fa7c2e523eb1559cc..9b9be44c528d3916b06f28267ec9ad8406befabf 100644 (file)
@@ -214,20 +214,13 @@ static int imx_serial_tstc(void)
        return 1;
 }
 
-static void imx_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 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,
 };
index c8b3658d475046a28b65e4b6fb2a7be22e28929b..09a3df4016215c62ebae83a3e0e9ed5b964034cd 100644 (file)
@@ -121,20 +121,13 @@ static int ixp_serial_getc(void)
        return (char) RBR(CONFIG_SYS_IXP425_CONSOLE) & 0xff;
 }
 
-static void ixp_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device ixp_serial_drv = {
        .name   = "ixp_serial",
        .start  = ixp_serial_init,
        .stop   = NULL,
        .setbrg = ixp_serial_setbrg,
        .putc   = ixp_serial_putc,
-       .puts   = ixp_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = ixp_serial_getc,
        .tstc   = ixp_serial_tstc,
 };
index 60e8007201dc743d2b5bdebd159b8492da4a3521..8b1c974de9332c613497d7ffc0a3c1709fa2706c 100644 (file)
@@ -102,13 +102,6 @@ static int ks8695_serial_tstc(void)
        return 0;
 }
 
-static void ks8695_serial_puts(const char *s)
-{
-       char c;
-       while ((c = *s++) != 0)
-               serial_putc(c);
-}
-
 static int ks8695_serial_getc(void)
 {
        volatile struct ks8695uart *uartp = KS8695_UART_ADDR;
@@ -124,7 +117,7 @@ static struct serial_device ks8695_serial_drv = {
        .stop   = NULL,
        .setbrg = ks8695_serial_setbrg,
        .putc   = ks8695_serial_putc,
-       .puts   = ks8695_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = ks8695_serial_getc,
        .tstc   = ks8695_serial_tstc,
 };
index 6c9628581b4ef2c7a8f86d88e253e395da72d02b..68e958ba77393b39bde6fba067915175ab29ddc3 100644 (file)
@@ -175,20 +175,13 @@ static int lh7a40x_serial_tstc(void)
        return(!(uart->status & UART_RXFE));
 }
 
-static void lh7a40x_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device lh7a40x_serial_drv = {
        .name   = "lh7a40x_serial",
        .start  = lh7a40x_serial_init,
        .stop   = NULL,
        .setbrg = lh7a40x_serial_setbrg,
        .putc   = lh7a40x_serial_putc,
-       .puts   = lh7a40x_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = lh7a40x_serial_getc,
        .tstc   = lh7a40x_serial_tstc,
 };
index fcab20280ec0b428ffe3ef8cbb393151681c79f7..8abc476713599c480f3dfde7b84a65ff2809e360 100644 (file)
@@ -89,13 +89,6 @@ static int lpc2292_serial_getc(void)
        return GET8(U0RBR);
 }
 
-static void lpc2292_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 /* Test if there is a byte to read */
 static int lpc2292_serial_tstc(void)
 {
@@ -108,7 +101,7 @@ static struct serial_device lpc2292_serial_drv = {
        .stop   = NULL,
        .setbrg = lpc2292_serial_setbrg,
        .putc   = lpc2292_serial_putc,
-       .puts   = lpc2292_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = lpc2292_serial_getc,
        .tstc   = lpc2292_serial_tstc,
 };
index b0612f5aca935a492f97a7efe7542e1ebaf9a9c9..9227d64088c858b9f95772c10fb417bdbacb0103 100644 (file)
@@ -187,13 +187,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.
@@ -228,7 +221,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,
 };
index d30adc31838c216cac39dbf6fd92461f086a2c00..44d7c500c798d9f436a399673b0dd8bb18563a5b 100644 (file)
@@ -182,20 +182,13 @@ static int netarm_serial_getc(void)
        return ch_uint & 0xff;
 }
 
-static void netarm_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device netarm_serial_drv = {
        .name   = "netarm_serial",
        .start  = netarm_serial_init,
        .stop   = NULL,
        .setbrg = netarm_serial_setbrg,
        .putc   = netarm_serial_putc,
-       .puts   = netarm_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = netarm_serial_getc,
        .tstc   = netarm_serial_tstc,
 };
index 7db7b65c3fdea787f18191c4242aa6eb436b2f0b..b331be794badb8f5d84710ba693348ca9600bc2e 100644 (file)
@@ -179,13 +179,6 @@ static void pl01x_serial_putc(const char c)
        pl01x_putc (CONSOLE_PORT, c);
 }
 
-static void pl01x_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static int pl01x_serial_getc(void)
 {
        return pl01x_getc (CONSOLE_PORT);
@@ -259,7 +252,7 @@ static struct serial_device pl01x_serial_drv = {
        .stop   = NULL,
        .setbrg = pl01x_serial_setbrg,
        .putc   = pl01x_serial_putc,
-       .puts   = pl01x_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = pl01x_serial_getc,
        .tstc   = pl01x_serial_tstc,
 };
index a4428e0f4735c99039d69cb265c4bc7ce5c67fc2..9cae843088aaa570bbf14a76b1d74fbc333c319d 100644 (file)
@@ -209,20 +209,13 @@ static int s3c44b0_serial_getc(void)
        }
 }
 
-static void s3c44b0_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device s3c44b0_serial_drv = {
        .name   = "s3c44b0_serial",
        .start  = s3c44b0_serial_init,
        .stop   = NULL,
        .setbrg = s3c44b0_serial_setbrg,
        .putc   = s3c44b0_serial_putc,
-       .puts   = s3c44b0_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = s3c44b0_serial_getc,
        .tstc   = s3c44b0_serial_tstc,
 };
index c6b34db7c61369f0f4f83ed9554504d919830a81..3c0f4c59fb47e8c0f8bf354e0090745cb43a8356 100644 (file)
@@ -153,20 +153,13 @@ static int sa1100_serial_getc(void)
 #endif
 }
 
-static void sa1100_serial_puts(const char *s)
-{
-       while (*s) {
-               serial_putc (*s++);
-       }
-}
-
 static struct serial_device sa1100_serial_drv = {
        .name   = "sa1100_serial",
        .start  = sa1100_serial_init,
        .stop   = NULL,
        .setbrg = sa1100_serial_setbrg,
        .putc   = sa1100_serial_putc,
-       .puts   = sa1100_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = sa1100_serial_getc,
        .tstc   = sa1100_serial_tstc,
 };
index 1ddfc7d87f607356057c8f9b06e00dd1cc8a0177..3c931d0212703f90cc2b099f023a5bcabad029d5 100644 (file)
@@ -136,13 +136,6 @@ static void sh_serial_putc(const char c)
        serial_raw_putc(c);
 }
 
-static void sh_serial_puts(const char *s)
-{
-       char c;
-       while ((c = *s++) != 0)
-               serial_putc(c);
-}
-
 static int sh_serial_tstc(void)
 {
        return serial_rx_fifo_level() ? 1 : 0;
@@ -196,7 +189,7 @@ static struct serial_device sh_serial_drv = {
        .stop   = NULL,
        .setbrg = sh_serial_setbrg,
        .putc   = sh_serial_putc,
-       .puts   = sh_serial_puts,
+       .puts   = default_serial_puts,
        .getc   = sh_serial_getc,
        .tstc   = sh_serial_tstc,
 };