summaryrefslogtreecommitdiff
path: root/arch/sparc/cpu
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-10-06 14:07:02 +0000
committerTom Rini <trini@ti.com>2012-10-17 07:55:50 -0700
commitec3fd68952662b1badb02caab9705eb93bdc4f1b (patch)
tree27e851d5f0b27b2b50b6125a818998aef597157a /arch/sparc/cpu
parentbfb7d7a3d61ff23f9dd265a56e8b5cac5bbfd76e (diff)
downloadu-boot-imx-ec3fd68952662b1badb02caab9705eb93bdc4f1b.zip
u-boot-imx-ec3fd68952662b1badb02caab9705eb93bdc4f1b.tar.gz
u-boot-imx-ec3fd68952662b1badb02caab9705eb93bdc4f1b.tar.bz2
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>
Diffstat (limited to 'arch/sparc/cpu')
-rw-r--r--arch/sparc/cpu/leon2/serial.c9
-rw-r--r--arch/sparc/cpu/leon3/serial.c9
2 files changed, 2 insertions, 16 deletions
diff --git a/arch/sparc/cpu/leon2/serial.c b/arch/sparc/cpu/leon2/serial.c
index 16fffb6..40d5b01 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 c4f3ee8..838d451 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,
};