aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut2012-10-06 14:07:02 +0000
committerTom Rini2012-10-17 07:55:50 -0700
commitec3fd68952662b1badb02caab9705eb93bdc4f1b (patch)
tree27e851d5f0b27b2b50b6125a818998aef597157a
parentbfb7d7a3d61ff23f9dd265a56e8b5cac5bbfd76e (diff)
serial: Use default_serial_puts() in drivers
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>
-rw-r--r--arch/mips/cpu/mips32/au1x00/au1x00_serial.c8
-rw-r--r--arch/mips/cpu/mips32/incaip/asc_serial.c10
-rw-r--r--arch/mips/cpu/xburst/jz_serial.c8
-rw-r--r--arch/powerpc/cpu/mpc5xx/serial.c10
-rw-r--r--arch/powerpc/cpu/mpc8220/uart.c9
-rw-r--r--arch/powerpc/cpu/mpc8260/serial_scc.c9
-rw-r--r--arch/powerpc/cpu/mpc8260/serial_smc.c9
-rw-r--r--arch/powerpc/cpu/mpc85xx/serial_scc.c9
-rw-r--r--arch/sparc/cpu/leon2/serial.c9
-rw-r--r--arch/sparc/cpu/leon3/serial.c9
-rw-r--r--board/Marvell/common/serial.c9
-rw-r--r--board/cogent/serial.c8
-rw-r--r--board/esd/cpci750/serial.c10
-rw-r--r--board/evb64260/serial.c9
-rw-r--r--board/pcippc2/fpga_serial.c7
-rw-r--r--board/pcippc2/fpga_serial.h1
-rw-r--r--board/pcippc2/pcippc2.c3
-rw-r--r--board/prodrive/p3mx/serial.c10
-rw-r--r--drivers/serial/altera_jtag_uart.c8
-rw-r--r--drivers/serial/altera_uart.c9
-rw-r--r--drivers/serial/atmel_usart.c8
-rw-r--r--drivers/serial/lpc32xx_hsuart.c8
-rw-r--r--drivers/serial/mcfuart.c9
-rw-r--r--drivers/serial/ns9750_serial.c15
-rw-r--r--drivers/serial/opencores_yanu.c10
-rw-r--r--drivers/serial/s3c4510b_uart.c6
-rw-r--r--drivers/serial/s3c64xx.c8
-rw-r--r--drivers/serial/serial_clps7111.c9
-rw-r--r--drivers/serial/serial_imx.c9
-rw-r--r--drivers/serial/serial_ixp.c9
-rw-r--r--drivers/serial/serial_ks8695.c9
-rw-r--r--drivers/serial/serial_lh7a40x.c9
-rw-r--r--drivers/serial/serial_lpc2292.c9
-rw-r--r--drivers/serial/serial_mxc.c9
-rw-r--r--drivers/serial/serial_netarm.c9
-rw-r--r--drivers/serial/serial_pl01x.c9
-rw-r--r--drivers/serial/serial_s3c44b0.c9
-rw-r--r--drivers/serial/serial_sa1100.c9
-rw-r--r--drivers/serial/serial_sh.c9
39 files changed, 39 insertions, 297 deletions
diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_serial.c b/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
index 0beac98fdeb..3e85b90cded 100644
--- a/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
+++ b/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
@@ -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,
};
diff --git a/arch/mips/cpu/mips32/incaip/asc_serial.c b/arch/mips/cpu/mips32/incaip/asc_serial.c
index 08949f4fb05..6f0e4f25201 100644
--- a/arch/mips/cpu/mips32/incaip/asc_serial.c
+++ b/arch/mips/cpu/mips32/incaip/asc_serial.c
@@ -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,
};
diff --git a/arch/mips/cpu/xburst/jz_serial.c b/arch/mips/cpu/xburst/jz_serial.c
index 31990077575..a1476573502 100644
--- a/arch/mips/cpu/xburst/jz_serial.c
+++ b/arch/mips/cpu/xburst/jz_serial.c
@@ -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,
};
diff --git a/arch/powerpc/cpu/mpc5xx/serial.c b/arch/powerpc/cpu/mpc5xx/serial.c
index 6ef8be8fac2..732856a5c57 100644
--- a/arch/powerpc/cpu/mpc5xx/serial.c
+++ b/arch/powerpc/cpu/mpc5xx/serial.c
@@ -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,
};
diff --git a/arch/powerpc/cpu/mpc8220/uart.c b/arch/powerpc/cpu/mpc8220/uart.c
index 25d4472ea04..772528f82c3 100644
--- a/arch/powerpc/cpu/mpc8220/uart.c
+++ b/arch/powerpc/cpu/mpc8220/uart.c
@@ -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,
};
diff --git a/arch/powerpc/cpu/mpc8260/serial_scc.c b/arch/powerpc/cpu/mpc8260/serial_scc.c
index ab7755824a9..ab2a2b29cb5 100644
--- a/arch/powerpc/cpu/mpc8260/serial_scc.c
+++ b/arch/powerpc/cpu/mpc8260/serial_scc.c
@@ -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,
};
diff --git a/arch/powerpc/cpu/mpc8260/serial_smc.c b/arch/powerpc/cpu/mpc8260/serial_smc.c
index 7edde9a492b..feba1f63d26 100644
--- a/arch/powerpc/cpu/mpc8260/serial_smc.c
+++ b/arch/powerpc/cpu/mpc8260/serial_smc.c
@@ -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,
};
diff --git a/arch/powerpc/cpu/mpc85xx/serial_scc.c b/arch/powerpc/cpu/mpc85xx/serial_scc.c
index fe9af55c7a5..6345362d885 100644
--- a/arch/powerpc/cpu/mpc85xx/serial_scc.c
+++ b/arch/powerpc/cpu/mpc85xx/serial_scc.c
@@ -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,
};
diff --git a/arch/sparc/cpu/leon2/serial.c b/arch/sparc/cpu/leon2/serial.c
index 16fffb621dd..40d5b01d271 100644
--- a/arch/sparc/cpu/leon2/serial.c
+++ b/arch/sparc/cpu/leon2/serial.c
@@ -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,
};
diff --git a/arch/sparc/cpu/leon3/serial.c b/arch/sparc/cpu/leon3/serial.c
index c4f3ee83c33..838d4514eeb 100644
--- a/arch/sparc/cpu/leon3/serial.c
+++ b/arch/sparc/cpu/leon3/serial.c
@@ -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,
};
diff --git a/board/Marvell/common/serial.c b/board/Marvell/common/serial.c
index 1327c62a75a..4a780c3746b 100644
--- a/board/Marvell/common/serial.c
+++ b/board/Marvell/common/serial.c
@@ -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,
};
diff --git a/board/cogent/serial.c b/board/cogent/serial.c
index cd4a976f89e..20631d162dd 100644
--- a/board/cogent/serial.c
+++ b/board/cogent/serial.c
@@ -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,
};
diff --git a/board/esd/cpci750/serial.c b/board/esd/cpci750/serial.c
index 25f8950e9ad..160e0e0ae02 100644
--- a/board/esd/cpci750/serial.c
+++ b/board/esd/cpci750/serial.c
@@ -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,
};
diff --git a/board/evb64260/serial.c b/board/evb64260/serial.c
index 9fd429864a7..b9ca1d760c0 100644
--- a/board/evb64260/serial.c
+++ b/board/evb64260/serial.c
@@ -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,
};
diff --git a/board/pcippc2/fpga_serial.c b/board/pcippc2/fpga_serial.c
index 5f89d9b125e..de61ca0e560 100644
--- a/board/pcippc2/fpga_serial.c
+++ b/board/pcippc2/fpga_serial.c
@@ -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);
diff --git a/board/pcippc2/fpga_serial.h b/board/pcippc2/fpga_serial.h
index 52750143c44..106fbf7a500 100644
--- a/board/pcippc2/fpga_serial.h
+++ b/board/pcippc2/fpga_serial.h
@@ -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);
diff --git a/board/pcippc2/pcippc2.c b/board/pcippc2/pcippc2.c
index 4a91458e8e6..5e6fc58cf76 100644
--- a/board/pcippc2/pcippc2.c
+++ b/board/pcippc2/pcippc2.c
@@ -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;
diff --git a/board/prodrive/p3mx/serial.c b/board/prodrive/p3mx/serial.c
index 2f4d294b9d2..3536933c001 100644
--- a/board/prodrive/p3mx/serial.c
+++ b/board/prodrive/p3mx/serial.c
@@ -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,
};
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 654b5019eba..28319baf187 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -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,
};
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 27550ed48db..118cd58ece8 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -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,
};
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 130303129e8..c4d7432efc6 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -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,
};
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 02429b55416..75599165781 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -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,
};
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 00a71146911..8ea9af0f610 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -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,
};
diff --git a/drivers/serial/ns9750_serial.c b/drivers/serial/ns9750_serial.c
index cb545c40657..85fc68a0760 100644
--- a/drivers/serial/ns9750_serial.c
+++ b/drivers/serial/ns9750_serial.c
@@ -100,19 +100,6 @@ static void ns9750_serial_putc(const char 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
* @Descr: performs only 8bit accesses to the FIFO. No error handling
@@ -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,
};
diff --git a/drivers/serial/opencores_yanu.c b/drivers/serial/opencores_yanu.c
index 49bccf3a6cd..4ca6ef0b252 100644
--- a/drivers/serial/opencores_yanu.c
+++ b/drivers/serial/opencores_yanu.c
@@ -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,
};
diff --git a/drivers/serial/s3c4510b_uart.c b/drivers/serial/s3c4510b_uart.c
index 423d26e6788..c460229e057 100644
--- a/drivers/serial/s3c4510b_uart.c
+++ b/drivers/serial/s3c4510b_uart.c
@@ -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;
diff --git a/drivers/serial/s3c64xx.c b/drivers/serial/s3c64xx.c
index 9ab8a28d838..ea8d734a9ed 100644
--- a/drivers/serial/s3c64xx.c
+++ b/drivers/serial/s3c64xx.c
@@ -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,
};
diff --git a/drivers/serial/serial_clps7111.c b/drivers/serial/serial_clps7111.c
index 65473e86080..c292ed87560 100644
--- a/drivers/serial/serial_clps7111.c
+++ b/drivers/serial/serial_clps7111.c
@@ -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,
};
diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index 6c075b5b912..9b9be44c528 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -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,
};
diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c
index c8b3658d475..09a3df40162 100644
--- a/drivers/serial/serial_ixp.c
+++ b/drivers/serial/serial_ixp.c
@@ -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,
};
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index 60e8007201d..8b1c974de93 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -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,
};
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 6c9628581b4..68e958ba773 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -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,
};
diff --git a/drivers/serial/serial_lpc2292.c b/drivers/serial/serial_lpc2292.c
index fcab20280ec..8abc4767135 100644
--- a/drivers/serial/serial_lpc2292.c
+++ b/drivers/serial/serial_lpc2292.c
@@ -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,
};
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index b0612f5aca9..9227d64088c 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -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,
};
diff --git a/drivers/serial/serial_netarm.c b/drivers/serial/serial_netarm.c
index d30adc31838..44d7c500c79 100644
--- a/drivers/serial/serial_netarm.c
+++ b/drivers/serial/serial_netarm.c
@@ -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,
};
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 7db7b65c3fd..b331be794ba 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -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,
};
diff --git a/drivers/serial/serial_s3c44b0.c b/drivers/serial/serial_s3c44b0.c
index a4428e0f473..9cae843088a 100644
--- a/drivers/serial/serial_s3c44b0.c
+++ b/drivers/serial/serial_s3c44b0.c
@@ -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,
};
diff --git a/drivers/serial/serial_sa1100.c b/drivers/serial/serial_sa1100.c
index c6b34db7c61..3c0f4c59fb4 100644
--- a/drivers/serial/serial_sa1100.c
+++ b/drivers/serial/serial_sa1100.c
@@ -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,
};
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 1ddfc7d87f6..3c931d02127 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -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,
};