summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-09-14 23:44:09 +0200
committerTom Rini <trini@ti.com>2012-10-15 11:53:58 -0700
commita3827250606895ec2dd4b8d867342b7cabf3692f (patch)
tree6b12200d510d6f07ce49ef3e90642b09142e60f4
parentbffe31c144909722eb8b5878992fdf402cd42f9d (diff)
serial: Remove CONFIG_SERIAL_MULTI from serial drivers
Remove the support for not-CONFIG_SERIAL_MULTI part from serial port drivers and some board files. Since CONFIG_SERIAL_MULTI is now enabled by default, that part is a dead code. Remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
-rw-r--r--arch/mips/cpu/mips32/au1x00/au1x00_serial.c32
-rw-r--r--arch/mips/cpu/mips32/incaip/asc_serial.c32
-rw-r--r--arch/mips/cpu/xburst/jz_serial.c32
-rw-r--r--arch/powerpc/cpu/mpc512x/serial.c64
-rw-r--r--arch/powerpc/cpu/mpc5xx/serial.c32
-rw-r--r--arch/powerpc/cpu/mpc5xxx/serial.c149
-rw-r--r--arch/powerpc/cpu/mpc8220/uart.c32
-rw-r--r--arch/powerpc/cpu/mpc8260/serial_scc.c32
-rw-r--r--arch/powerpc/cpu/mpc8260/serial_smc.c32
-rw-r--r--arch/powerpc/cpu/mpc85xx/serial_scc.c32
-rw-r--r--arch/powerpc/cpu/ppc4xx/iop480_uart.c35
-rw-r--r--arch/sparc/cpu/leon2/serial.c32
-rw-r--r--arch/sparc/cpu/leon3/serial.c32
-rw-r--r--board/Marvell/common/serial.c32
-rw-r--r--board/amirix/ap1000/serial.c31
-rw-r--r--board/bmw/serial.c32
-rw-r--r--board/cogent/serial.c32
-rw-r--r--board/esd/cpci750/serial.c31
-rw-r--r--board/evb64260/serial.c31
-rw-r--r--board/ml2/serial.c31
-rw-r--r--board/pcippc2/sconsole.c31
-rw-r--r--board/pdm360ng/pdm360ng.c6
-rw-r--r--board/prodrive/p3mx/serial.c32
-rw-r--r--board/trizepsiv/conxs.c2
-rw-r--r--drivers/serial/altera_jtag_uart.c32
-rw-r--r--drivers/serial/altera_uart.c32
-rw-r--r--drivers/serial/atmel_usart.c32
-rw-r--r--drivers/serial/lpc32xx_hsuart.c32
-rw-r--r--drivers/serial/mcfuart.c32
-rw-r--r--drivers/serial/ns9750_serial.c32
-rw-r--r--drivers/serial/opencores_yanu.c32
-rw-r--r--drivers/serial/s3c4510b_uart.c32
-rw-r--r--drivers/serial/s3c64xx.c32
-rw-r--r--drivers/serial/sandbox.c32
-rw-r--r--drivers/serial/serial_clps7111.c32
-rw-r--r--drivers/serial/serial_imx.c32
-rw-r--r--drivers/serial/serial_ixp.c32
-rw-r--r--drivers/serial/serial_ks8695.c32
-rw-r--r--drivers/serial/serial_lh7a40x.c32
-rw-r--r--drivers/serial/serial_lpc2292.c32
-rw-r--r--drivers/serial/serial_max3100.c32
-rw-r--r--drivers/serial/serial_mxc.c36
-rw-r--r--drivers/serial/serial_netarm.c32
-rw-r--r--drivers/serial/serial_ns16550.c95
-rw-r--r--drivers/serial/serial_pl01x.c32
-rw-r--r--drivers/serial/serial_pxa.c18
-rw-r--r--drivers/serial/serial_s3c24x0.c53
-rw-r--r--drivers/serial/serial_s3c44b0.c32
-rw-r--r--drivers/serial/serial_sa1100.c32
-rw-r--r--drivers/serial/serial_sh.c32
-rw-r--r--drivers/serial/serial_xuartlite.c34
-rw-r--r--drivers/serial/serial_zynq.c32
52 files changed, 39 insertions, 1792 deletions
diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_serial.c b/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
index 9682775199b..0beac98fdeb 100644
--- a/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
+++ b/arch/mips/cpu/mips32/au1x00/au1x00_serial.c
@@ -131,7 +131,6 @@ static int au1x00_serial_tstc(void)
return 0;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device au1x00_serial_drv = {
.name = "au1x00_serial",
.start = au1x00_serial_init,
@@ -152,34 +151,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &au1x00_serial_drv;
}
-#else
-int serial_init(void)
-{
- return au1x00_serial_init();
-}
-
-void serial_setbrg(void)
-{
- au1x00_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- au1x00_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- au1x00_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return au1x00_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return au1x00_serial_tstc();
-}
-#endif
diff --git a/arch/mips/cpu/mips32/incaip/asc_serial.c b/arch/mips/cpu/mips32/incaip/asc_serial.c
index b5f32e2820f..08949f4fb05 100644
--- a/arch/mips/cpu/mips32/incaip/asc_serial.c
+++ b/arch/mips/cpu/mips32/incaip/asc_serial.c
@@ -286,7 +286,6 @@ static int asc_serial_tstc(void)
return res;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device asc_serial_drv = {
.name = "asc_serial",
.start = asc_serial_init,
@@ -307,34 +306,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &asc_serial_drv;
}
-#else
-int serial_init(void)
-{
- return asc_serial_init();
-}
-
-void serial_setbrg(void)
-{
- asc_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- asc_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- asc_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return asc_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return asc_serial_tstc();
-}
-#endif
diff --git a/arch/mips/cpu/xburst/jz_serial.c b/arch/mips/cpu/xburst/jz_serial.c
index b1e1d276e72..31990077575 100644
--- a/arch/mips/cpu/xburst/jz_serial.c
+++ b/arch/mips/cpu/xburst/jz_serial.c
@@ -115,7 +115,6 @@ static void jz_serial_puts(const char *s)
serial_putc(*s++);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device jz_serial_drv = {
.name = "jz_serial",
.start = jz_serial_init,
@@ -136,34 +135,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &jz_serial_drv;
}
-#else
-int serial_init(void)
-{
- return jz_serial_init();
-}
-
-void serial_setbrg(void)
-{
- jz_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- jz_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- jz_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return jz_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return jz_serial_tstc();
-}
-#endif
diff --git a/arch/powerpc/cpu/mpc512x/serial.c b/arch/powerpc/cpu/mpc512x/serial.c
index bc10c501aac..58587fd5bcf 100644
--- a/arch/powerpc/cpu/mpc512x/serial.c
+++ b/arch/powerpc/cpu/mpc512x/serial.c
@@ -37,7 +37,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if defined(CONFIG_PSC_CONSOLE) || defined(CONFIG_SERIAL_MULTI)
+#if defined(CONFIG_PSC_CONSOLE)
static void fifo_init (volatile psc512x_t *psc)
{
@@ -52,7 +52,6 @@ static void fifo_init (volatile psc512x_t *psc)
out_be32(&psc->rfintmask, 0);
out_be32(&psc->tfintmask, 0);
-#if defined(CONFIG_SERIAL_MULTI)
switch (((u32)psc & 0xf00) >> 8) {
case 0:
tfsize = FIFOC_PSC0_TX_SIZE | (FIFOC_PSC0_TX_ADDR << 16);
@@ -105,10 +104,7 @@ static void fifo_init (volatile psc512x_t *psc)
default:
return;
}
-#else
- tfsize = CONSOLE_FIFO_TX_SIZE | (CONSOLE_FIFO_TX_ADDR << 16);
- rfsize = CONSOLE_FIFO_RX_SIZE | (CONSOLE_FIFO_RX_ADDR << 16);
-#endif
+
out_be32(&psc->tfsize, tfsize);
out_be32(&psc->rfsize, rfsize);
@@ -155,12 +151,10 @@ int serial_init_dev(unsigned int idx)
{
volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
volatile psc512x_t *psc = (psc512x_t *) &im->psc[idx];
-#if defined(CONFIG_SERIAL_MULTI)
u32 reg;
reg = in_be32(&im->clk.sccr[0]);
out_be32(&im->clk.sccr[0], reg | CLOCK_SCCR1_PSC_EN(idx));
-#endif
fifo_init (psc);
@@ -285,9 +279,7 @@ int serial_getcts_dev(unsigned int idx)
return (in_8(&psc->ip) & 0x1) ? 0 : 1;
}
-#endif /* CONFIG_PSC_CONSOLE || CONFIG_SERIAL_MULTI */
-
-#if defined(CONFIG_SERIAL_MULTI)
+#endif /* CONFIG_PSC_CONSOLE */
#define DECLARE_PSC_SERIAL_FUNCTIONS(port) \
int serial##port##_init(void) \
@@ -381,55 +373,6 @@ void mpc512x_serial_initialize(void)
#endif
}
-#else
-
-void serial_setbrg(void)
-{
- serial_setbrg_dev(CONFIG_PSC_CONSOLE);
-}
-
-int serial_init(void)
-{
- return serial_init_dev(CONFIG_PSC_CONSOLE);
-}
-
-void serial_putc(const char c)
-{
- serial_putc_dev(CONFIG_PSC_CONSOLE, c);
-}
-
-void serial_putc_raw(const char c)
-{
- serial_putc_raw_dev(CONFIG_PSC_CONSOLE, c);
-}
-
-void serial_puts(const char *s)
-{
- serial_puts_dev(CONFIG_PSC_CONSOLE, s);
-}
-
-int serial_getc(void)
-{
- return serial_getc_dev(CONFIG_PSC_CONSOLE);
-}
-
-int serial_tstc(void)
-{
- return serial_tstc_dev(CONFIG_PSC_CONSOLE);
-}
-
-void serial_setrts(int s)
-{
- return serial_setrts_dev(CONFIG_PSC_CONSOLE, s);
-}
-
-int serial_getcts(void)
-{
- return serial_getcts_dev(CONFIG_PSC_CONSOLE);
-}
-#endif /* CONFIG_PSC_CONSOLE */
-
-#if defined(CONFIG_SERIAL_MULTI)
#include <stdio_dev.h>
/*
* Routines for communication with serial devices over PSC
@@ -514,4 +457,3 @@ int read_port(struct stdio_dev *port, char *buf, int size)
return cnt;
}
-#endif /* CONFIG_SERIAL_MULTI */
diff --git a/arch/powerpc/cpu/mpc5xx/serial.c b/arch/powerpc/cpu/mpc5xx/serial.c
index a4fd6bceccd..6ef8be8fac2 100644
--- a/arch/powerpc/cpu/mpc5xx/serial.c
+++ b/arch/powerpc/cpu/mpc5xx/serial.c
@@ -169,7 +169,6 @@ static void mpc5xx_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mpc5xx_serial_drv = {
.name = "mpc5xx_serial",
.start = mpc5xx_serial_init,
@@ -190,34 +189,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &mpc5xx_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mpc5xx_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mpc5xx_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mpc5xx_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mpc5xx_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mpc5xx_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mpc5xx_serial_tstc();
-}
-#endif
diff --git a/arch/powerpc/cpu/mpc5xxx/serial.c b/arch/powerpc/cpu/mpc5xxx/serial.c
index 9bebff85123..eb141619b87 100644
--- a/arch/powerpc/cpu/mpc5xxx/serial.c
+++ b/arch/powerpc/cpu/mpc5xxx/serial.c
@@ -25,7 +25,7 @@
* Linux/PPC sources (m8260_tty.c had no copyright info in it).
*
* Martin Krause, 8 Jun 2006
- * Added CONFIG_SERIAL_MULTI support
+ * Added SERIAL_MULTI support
*/
/*
@@ -36,10 +36,7 @@
#include <common.h>
#include <linux/compiler.h>
#include <mpc5xxx.h>
-
-#if defined (CONFIG_SERIAL_MULTI)
#include <serial.h>
-#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -61,11 +58,8 @@ DECLARE_GLOBAL_DATA_PTR;
#error CONFIG_PSC_CONSOLE must be in 1 ... 6
#endif
-#if defined(CONFIG_SERIAL_MULTI) && !defined(CONFIG_PSC_CONSOLE2)
-#error you must define CONFIG_PSC_CONSOLE2 if CONFIG_SERIAL_MULTI is set
-#endif
+#if defined(CONFIG_PSC_CONSOLE2)
-#if defined(CONFIG_SERIAL_MULTI)
#if CONFIG_PSC_CONSOLE2 == 1
#define PSC_BASE2 MPC5XXX_PSC1
#elif CONFIG_PSC_CONSOLE2 == 2
@@ -81,19 +75,12 @@ DECLARE_GLOBAL_DATA_PTR;
#else
#error CONFIG_PSC_CONSOLE2 must be in 1 ... 6
#endif
-#endif /* CONFIG_SERIAL_MULTI */
-#if defined(CONFIG_SERIAL_MULTI)
-int serial_init_dev (unsigned long dev_base)
-#else
-int serial_init (void)
#endif
+
+int serial_init_dev (unsigned long dev_base)
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
unsigned long baseclk;
int div;
@@ -127,24 +114,12 @@ int serial_init (void)
return (0);
}
-#if defined(CONFIG_SERIAL_MULTI)
void serial_putc_dev (unsigned long dev_base, const char c)
-#else
-void serial_putc(const char c)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
if (c == '\n')
-#if defined(CONFIG_SERIAL_MULTI)
serial_putc_dev (dev_base, '\r');
-#else
- serial_putc('\r');
-#endif
/* Wait for last character to go. */
while (!(psc->psc_status & PSC_SR_TXEMP))
@@ -153,17 +128,9 @@ void serial_putc(const char c)
psc->psc_buffer_8 = c;
}
-#if defined(CONFIG_SERIAL_MULTI)
void serial_putc_raw_dev(unsigned long dev_base, const char c)
-#else
-void serial_putc_raw(const char c)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
/* Wait for last character to go. */
while (!(psc->psc_status & PSC_SR_TXEMP))
;
@@ -172,32 +139,16 @@ void serial_putc_raw(const char c)
}
-#if defined(CONFIG_SERIAL_MULTI)
void serial_puts_dev (unsigned long dev_base, const char *s)
-#else
-void serial_puts (const char *s)
-#endif
{
while (*s) {
-#if defined(CONFIG_SERIAL_MULTI)
serial_putc_dev (dev_base, *s++);
-#else
- serial_putc (*s++);
-#endif
}
}
-#if defined(CONFIG_SERIAL_MULTI)
int serial_getc_dev (unsigned long dev_base)
-#else
-int serial_getc(void)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
/* Wait for a character to arrive. */
while (!(psc->psc_status & PSC_SR_RXRDY))
@@ -206,32 +157,16 @@ int serial_getc(void)
return psc->psc_buffer_8;
}
-#if defined(CONFIG_SERIAL_MULTI)
int serial_tstc_dev (unsigned long dev_base)
-#else
-int serial_tstc(void)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
return (psc->psc_status & PSC_SR_RXRDY);
}
-#if defined(CONFIG_SERIAL_MULTI)
void serial_setbrg_dev (unsigned long dev_base)
-#else
-void serial_setbrg(void)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
unsigned long baseclk, div;
baseclk = (gd->ipb_clk + 16) / 32;
@@ -242,17 +177,9 @@ void serial_setbrg(void)
psc->ctlr = div & 0xff;
}
-#if defined(CONFIG_SERIAL_MULTI)
void serial_setrts_dev (unsigned long dev_base, int s)
-#else
-void serial_setrts(int s)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
if (s) {
/* Assert RTS (become LOW) */
@@ -264,78 +191,43 @@ void serial_setrts(int s)
}
}
-#if defined(CONFIG_SERIAL_MULTI)
int serial_getcts_dev (unsigned long dev_base)
-#else
-int serial_getcts(void)
-#endif
{
-#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-#else
- volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
-#endif
return (psc->ip & 0x1) ? 0 : 1;
}
-#if defined(CONFIG_SERIAL_MULTI)
int serial0_init(void)
{
return (serial_init_dev(PSC_BASE));
}
-int serial1_init(void)
-{
- return (serial_init_dev(PSC_BASE2));
-}
void serial0_setbrg (void)
{
serial_setbrg_dev(PSC_BASE);
}
-void serial1_setbrg (void)
-{
- serial_setbrg_dev(PSC_BASE2);
-}
void serial0_putc(const char c)
{
serial_putc_dev(PSC_BASE,c);
}
-void serial1_putc(const char c)
-{
- serial_putc_dev(PSC_BASE2, c);
-}
void serial0_puts(const char *s)
{
serial_puts_dev(PSC_BASE, s);
}
-void serial1_puts(const char *s)
-{
- serial_puts_dev(PSC_BASE2, s);
-}
-
int serial0_getc(void)
{
return(serial_getc_dev(PSC_BASE));
}
-int serial1_getc(void)
-{
- return(serial_getc_dev(PSC_BASE2));
-}
int serial0_tstc(void)
{
return (serial_tstc_dev(PSC_BASE));
}
-int serial1_tstc(void)
-{
- return (serial_tstc_dev(PSC_BASE2));
-}
-
struct serial_device serial0_device =
{
.name = "serial0",
@@ -353,6 +245,37 @@ __weak struct serial_device *default_serial_console(void)
return &serial0_device;
}
+#ifdef CONFIG_PSC_CONSOLE2
+int serial1_init(void)
+{
+ return serial_init_dev(PSC_BASE2);
+}
+
+void serial1_setbrg(void)
+{
+ serial_setbrg_dev(PSC_BASE2);
+}
+
+void serial1_putc(const char c)
+{
+ serial_putc_dev(PSC_BASE2, c);
+}
+
+void serial1_puts(const char *s)
+{
+ serial_puts_dev(PSC_BASE2, s);
+}
+
+int serial1_getc(void)
+{
+ return serial_getc_dev(PSC_BASE2);
+}
+
+int serial1_tstc(void)
+{
+ return serial_tstc_dev(PSC_BASE2);
+}
+
struct serial_device serial1_device =
{
.name = "serial1",
@@ -364,6 +287,6 @@ struct serial_device serial1_device =
.putc = serial1_putc,
.puts = serial1_puts,
};
-#endif /* CONFIG_SERIAL_MULTI */
+#endif /* CONFIG_PSC_CONSOLE2 */
#endif /* CONFIG_PSC_CONSOLE */
diff --git a/arch/powerpc/cpu/mpc8220/uart.c b/arch/powerpc/cpu/mpc8220/uart.c
index 545c81aa423..25d4472ea04 100644
--- a/arch/powerpc/cpu/mpc8220/uart.c
+++ b/arch/powerpc/cpu/mpc8220/uart.c
@@ -126,7 +126,6 @@ static void mpc8220_serial_setbrg(void)
psc->cr = PSC_CR_RX_ENABLE | PSC_CR_TX_ENABLE;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mpc8220_serial_drv = {
.name = "mpc8220_serial",
.start = mpc8220_serial_init,
@@ -147,35 +146,4 @@ __weak struct serial_device *default_serial_console(void)
{
return &mpc8220_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mpc8220_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mpc8220_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mpc8220_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mpc8220_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mpc8220_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mpc8220_serial_tstc();
-}
-#endif
#endif /* CONFIG_PSC_CONSOLE */
diff --git a/arch/powerpc/cpu/mpc8260/serial_scc.c b/arch/powerpc/cpu/mpc8260/serial_scc.c
index 7bfd42065cf..ab7755824a9 100644
--- a/arch/powerpc/cpu/mpc8260/serial_scc.c
+++ b/arch/powerpc/cpu/mpc8260/serial_scc.c
@@ -261,7 +261,6 @@ static int mpc8260_scc_serial_tstc(void)
return ((rbdf->cbd_sc & BD_SC_EMPTY) == 0);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mpc8260_scc_serial_drv = {
.name = "mpc8260_scc_uart",
.start = mpc8260_scc_serial_init,
@@ -282,37 +281,6 @@ __weak struct serial_device *default_serial_console(void)
{
return &mpc8260_scc_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mpc8260_scc_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mpc8260_scc_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mpc8260_scc_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mpc8260_scc_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mpc8260_scc_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mpc8260_scc_serial_tstc();
-}
-#endif
#endif /* CONFIG_CONS_ON_SCC */
#if defined(CONFIG_KGDB_ON_SCC)
diff --git a/arch/powerpc/cpu/mpc8260/serial_smc.c b/arch/powerpc/cpu/mpc8260/serial_smc.c
index 0f3b834d9e6..7edde9a492b 100644
--- a/arch/powerpc/cpu/mpc8260/serial_smc.c
+++ b/arch/powerpc/cpu/mpc8260/serial_smc.c
@@ -264,7 +264,6 @@ static int mpc8260_smc_serial_tstc(void)
return !(rtx->rxbd.cbd_sc & BD_SC_EMPTY);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mpc8260_smc_serial_drv = {
.name = "mpc8260_smc_uart",
.start = mpc8260_smc_serial_init,
@@ -285,37 +284,6 @@ __weak struct serial_device *default_serial_console(void)
{
return &mpc8260_smc_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mpc8260_smc_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mpc8260_smc_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mpc8260_smc_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mpc8260_smc_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mpc8260_smc_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mpc8260_smc_serial_tstc();
-}
-#endif
#endif /* CONFIG_CONS_ON_SMC */
#if defined(CONFIG_KGDB_ON_SMC)
diff --git a/arch/powerpc/cpu/mpc85xx/serial_scc.c b/arch/powerpc/cpu/mpc85xx/serial_scc.c
index d192642f04e..fe9af55c7a5 100644
--- a/arch/powerpc/cpu/mpc85xx/serial_scc.c
+++ b/arch/powerpc/cpu/mpc85xx/serial_scc.c
@@ -262,7 +262,6 @@ static int mpc85xx_serial_tstc(void)
return ((rbdf->cbd_sc & BD_SC_EMPTY) == 0);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mpc85xx_serial_drv = {
.name = "mpc85xx_serial",
.start = mpc85xx_serial_init,
@@ -283,35 +282,4 @@ __weak struct serial_device *default_serial_console(void)
{
return &mpc85xx_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mpc85xx_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mpc85xx_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mpc85xx_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mpc85xx_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mpc85xx_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mpc85xx_serial_tstc();
-}
-#endif
#endif /* CONFIG_CONS_ON_SCC */
diff --git a/arch/powerpc/cpu/ppc4xx/iop480_uart.c b/arch/powerpc/cpu/ppc4xx/iop480_uart.c
index fb25e15902b..94739848904 100644
--- a/arch/powerpc/cpu/ppc4xx/iop480_uart.c
+++ b/arch/powerpc/cpu/ppc4xx/iop480_uart.c
@@ -26,11 +26,8 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <watchdog.h>
-
-#ifdef CONFIG_SERIAL_MULTI
#include <serial.h>
#include <linux/compiler.h>
-#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -234,7 +231,6 @@ static int iop480_serial_tstc(void)
return 0;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device iop480_serial_drv = {
.name = "iop480_serial",
.start = iop480_serial_init,
@@ -255,35 +251,4 @@ __weak struct serial_device *default_serial_console(void)
{
return &iop480_serial_drv;
}
-#else
-int serial_init(void)
-{
- return iop480_serial_init();
-}
-
-void serial_setbrg(void)
-{
- iop480_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- iop480_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- iop480_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return iop480_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return iop480_serial_tstc();
-}
-#endif
#endif /* CONFIG_IOP480 */
diff --git a/arch/sparc/cpu/leon2/serial.c b/arch/sparc/cpu/leon2/serial.c
index 61d059b7e46..16fffb621dd 100644
--- a/arch/sparc/cpu/leon2/serial.c
+++ b/arch/sparc/cpu/leon2/serial.c
@@ -166,7 +166,6 @@ static void leon2_serial_setbrg(void)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device leon2_serial_drv = {
.name = "leon2_serial",
.start = leon2_serial_init,
@@ -187,34 +186,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &leon2_serial_drv;
}
-#else
-int serial_init(void)
-{
- return leon2_serial_init();
-}
-
-void serial_setbrg(void)
-{
- leon2_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- leon2_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- leon2_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return leon2_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return leon2_serial_tstc();
-}
-#endif
diff --git a/arch/sparc/cpu/leon3/serial.c b/arch/sparc/cpu/leon3/serial.c
index a110244c9ef..c4f3ee83c33 100644
--- a/arch/sparc/cpu/leon3/serial.c
+++ b/arch/sparc/cpu/leon3/serial.c
@@ -140,7 +140,6 @@ static void leon3_serial_setbrg(void)
return;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device leon3_serial_drv = {
.name = "leon3_serial",
.start = leon3_serial_init,
@@ -161,34 +160,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &leon3_serial_drv;
}
-#else
-int serial_init(void)
-{
- return leon3_serial_init();
-}
-
-void serial_setbrg(void)
-{
- leon3_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- leon3_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- leon3_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return leon3_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return leon3_serial_tstc();
-}
-#endif
diff --git a/board/Marvell/common/serial.c b/board/Marvell/common/serial.c
index a5231eb434e..1327c62a75a 100644
--- a/board/Marvell/common/serial.c
+++ b/board/Marvell/common/serial.c
@@ -146,7 +146,6 @@ static void marvell_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device marvell_serial_drv = {
.name = "marvell_serial",
.start = marvell_serial_init,
@@ -167,37 +166,6 @@ __weak struct serial_device *default_serial_console(void)
{
return &marvell_serial_drv;
}
-#else
-int serial_init(void)
-{
- return marvell_serial_init();
-}
-
-void serial_setbrg(void)
-{
- marvell_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- marvell_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- marvell_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return marvell_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return marvell_serial_tstc();
-}
-#endif
#if defined(CONFIG_CMD_KGDB)
void kgdb_serial_init (void)
diff --git a/board/amirix/ap1000/serial.c b/board/amirix/ap1000/serial.c
index 2c2e9f9d769..a77d332bcd8 100644
--- a/board/amirix/ap1000/serial.c
+++ b/board/amirix/ap1000/serial.c
@@ -86,7 +86,6 @@ static void amirix_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device amirix_serial_drv = {
.name = "amirix_serial",
.start = amirix_serial_init,
@@ -107,37 +106,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &amirix_serial_drv;
}
-#else
-int serial_init(void)
-{
- return amirix_serial_init();
-}
-
-void serial_setbrg(void)
-{
- amirix_serial_setbrg();
-}
-void serial_putc(const char c)
-{
- amirix_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- amirix_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return amirix_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return amirix_serial_tstc();
-}
-#endif
#if defined(CONFIG_CMD_KGDB)
void kgdb_serial_init (void)
{
diff --git a/board/bmw/serial.c b/board/bmw/serial.c
index 569131fbd5d..08f449c8642 100644
--- a/board/bmw/serial.c
+++ b/board/bmw/serial.c
@@ -83,7 +83,6 @@ static void bmw_serial_setbrg(void)
NS16550_reinit (console, clock_divisor);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device bmw_serial_drv = {
.name = "bmw_serial",
.start = bmw_serial_init,
@@ -104,34 +103,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &bmw_serial_drv;
}
-#else
-int serial_init(void)
-{
- return bmw_serial_init();
-}
-
-void serial_setbrg(void)
-{
- bmw_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- bmw_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- bmw_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return bmw_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return bmw_serial_tstc();
-}
-#endif
diff --git a/board/cogent/serial.c b/board/cogent/serial.c
index 18a9dbf35cd..cd4a976f89e 100644
--- a/board/cogent/serial.c
+++ b/board/cogent/serial.c
@@ -90,7 +90,6 @@ static int cogent_serial_tstc(void)
return ((cma_mb_reg_read (&mbsp->ser_lsr) & LSR_DR) != 0);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device cogent_serial_drv = {
.name = "cogent_serial",
.start = cogent_serial_init,
@@ -111,37 +110,6 @@ __weak struct serial_device *default_serial_console(void)
{
return &cogent_serial_drv;
}
-#else
-int serial_init(void)
-{
- return cogent_serial_init();
-}
-
-void serial_setbrg(void)
-{
- cogent_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- cogent_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- cogent_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return cogent_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return cogent_serial_tstc();
-}
-#endif
#endif /* CONS_NONE */
#if defined(CONFIG_CMD_KGDB) && \
diff --git a/board/esd/cpci750/serial.c b/board/esd/cpci750/serial.c
index 9ff7c27c9bb..25f8950e9ad 100644
--- a/board/esd/cpci750/serial.c
+++ b/board/esd/cpci750/serial.c
@@ -83,7 +83,6 @@ static void cpci750_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device cpci750_serial_drv = {
.name = "cpci750_serial",
.start = cpci750_serial_init,
@@ -104,37 +103,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &cpci750_serial_drv;
}
-#else
-int serial_init(void)
-{
- return cpci750_serial_init();
-}
-
-void serial_setbrg(void)
-{
- cpci750_serial_setbrg();
-}
-void serial_putc(const char c)
-{
- cpci750_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- cpci750_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return cpci750_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return cpci750_serial_tstc();
-}
-#endif
#if defined(CONFIG_CMD_KGDB)
void kgdb_serial_init (void)
{
diff --git a/board/evb64260/serial.c b/board/evb64260/serial.c
index cf46a4d1270..9fd429864a7 100644
--- a/board/evb64260/serial.c
+++ b/board/evb64260/serial.c
@@ -146,7 +146,6 @@ static void evb64260_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device evb64260_serial_drv = {
.name = "evb64260_serial",
.start = evb64260_serial_init,
@@ -167,37 +166,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &evb64260_serial_drv;
}
-#else
-int serial_init(void)
-{
- return evb64260_serial_init();
-}
-
-void serial_setbrg(void)
-{
- evb64260_serial_setbrg();
-}
-void serial_putc(const char c)
-{
- evb64260_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- evb64260_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return evb64260_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return evb64260_serial_tstc();
-}
-#endif
#if defined(CONFIG_CMD_KGDB)
void
kgdb_serial_init(void)
diff --git a/board/ml2/serial.c b/board/ml2/serial.c
index 0ed1150d905..787ff464d21 100644
--- a/board/ml2/serial.c
+++ b/board/ml2/serial.c
@@ -90,7 +90,6 @@ static void ml2_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device ml2_serial_drv = {
.name = "ml2_serial",
.start = ml2_serial_init,
@@ -111,37 +110,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &ml2_serial_drv;
}
-#else
-int serial_init(void)
-{
- return ml2_serial_init();
-}
-
-void serial_setbrg(void)
-{
- ml2_serial_setbrg();
-}
-void serial_putc(const char c)
-{
- ml2_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- ml2_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return ml2_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return ml2_serial_tstc();
-}
-#endif
#if defined(CONFIG_CMD_KGDB)
void kgdb_serial_init (void)
{
diff --git a/board/pcippc2/sconsole.c b/board/pcippc2/sconsole.c
index 0a319635570..aa3c908c638 100644
--- a/board/pcippc2/sconsole.c
+++ b/board/pcippc2/sconsole.c
@@ -115,7 +115,6 @@ static void sconsole_serial_setbrg(void)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device sconsole_serial_drv = {
.name = "sconsole_serial",
.start = sconsole_serial_init,
@@ -136,37 +135,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &sconsole_serial_drv;
}
-#else
-int serial_init(void)
-{
- return sconsole_serial_init();
-}
-
-void serial_setbrg(void)
-{
- sconsole_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- sconsole_serial_putc(c);
-}
-void serial_puts(const char *s)
-{
- sconsole_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return sconsole_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return sconsole_serial_tstc();
-}
-#endif
int sconsole_get_baudrate (void)
{
sconsole_buffer_t *sb = SCONSOLE_BUFFER;
diff --git a/board/pdm360ng/pdm360ng.c b/board/pdm360ng/pdm360ng.c
index 2082ad48a27..a2a132344f5 100644
--- a/board/pdm360ng/pdm360ng.c
+++ b/board/pdm360ng/pdm360ng.c
@@ -172,9 +172,7 @@ phys_size_t initdram (int board_type)
return msize;
}
-#if defined(CONFIG_SERIAL_MULTI)
static int set_lcd_brightness(char *);
-#endif
int misc_init_r(void)
{
@@ -237,9 +235,7 @@ int misc_init_r(void)
#endif
#ifdef CONFIG_FSL_DIU_FB
-#if defined(CONFIG_SERIAL_MULTI)
set_lcd_brightness(0);
-#endif
/* Switch LCD-Backlight and LVDS-Interface on */
setbits_be32(&im->gpio.gpdir, 0x01040000);
clrsetbits_be32(&im->gpio.gpdat, 0x01000000, 0x00040000);
@@ -608,7 +604,6 @@ void ft_board_setup(void *blob, bd_t *bd)
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
-#if defined(CONFIG_SERIAL_MULTI)
/*
* If argument is NULL, set the LCD brightness to the
* value from "brightness" environment variable. Set
@@ -685,4 +680,3 @@ U_BOOT_CMD(lcdbr, 2, 1, cmd_lcd_brightness,
"set LCD brightness",
"<brightness> - set LCD backlight level to <brightness>.\n"
);
-#endif /* CONFIG_SERIAL_MULTI */
diff --git a/board/prodrive/p3mx/serial.c b/board/prodrive/p3mx/serial.c
index d3591b4667d..2f4d294b9d2 100644
--- a/board/prodrive/p3mx/serial.c
+++ b/board/prodrive/p3mx/serial.c
@@ -83,7 +83,6 @@ static void p3mx_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device p3mx_serial_drv = {
.name = "p3mx_serial",
.start = p3mx_serial_init,
@@ -104,37 +103,6 @@ __weak struct serial_device *default_serial_console(void)
{
return &p3mx_serial_drv;
}
-#else
-int serial_init(void)
-{
- return p3mx_serial_init();
-}
-
-void serial_setbrg(void)
-{
- p3mx_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- p3mx_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- p3mx_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return p3mx_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return p3mx_serial_tstc();
-}
-#endif
#if defined(CONFIG_CMD_KGDB)
void kgdb_serial_init (void)
diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c
index 8fc3c40e6b4..871e052b04e 100644
--- a/board/trizepsiv/conxs.c
+++ b/board/trizepsiv/conxs.c
@@ -120,7 +120,6 @@ int board_init (void)
int board_late_init(void)
{
-#if defined(CONFIG_SERIAL_MULTI)
char *console=getenv("boot_console");
if ((console == NULL) || (strcmp(console,"serial_btuart") &&
@@ -131,7 +130,6 @@ int board_late_init(void)
setenv("stdout",console);
setenv("stdin", console);
setenv("stderr",console);
-#endif
return 0;
}
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 8cb4606d37b..654b5019eba 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -85,7 +85,6 @@ static int altera_jtag_serial_getc(void)
return (c);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device altera_jtag_serial_drv = {
.name = "altera_jtag_uart",
.start = altera_jtag_serial_init,
@@ -106,34 +105,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &altera_jtag_serial_drv;
}
-#else
-int serial_init(void)
-{
- return altera_jtag_serial_init();
-}
-
-void serial_setbrg(void)
-{
- altera_jtag_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- altera_jtag_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- altera_jtag_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return altera_jtag_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return altera_jtag_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 1d0dd6929c9..27550ed48db 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -101,7 +101,6 @@ static int altera_serial_getc(void)
return (readl (&uart->rxdata) & 0x00ff );
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device altera_serial_drv = {
.name = "altera_serial",
.start = altera_serial_init,
@@ -122,34 +121,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &altera_serial_drv;
}
-#else
-int serial_init(void)
-{
- return altera_serial_init();
-}
-
-void serial_setbrg(void)
-{
- altera_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- altera_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- altera_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return altera_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return altera_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index d49d5d4356b..130303129e8 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -107,7 +107,6 @@ static int atmel_serial_tstc(void)
return (readl(&usart->csr) & USART3_BIT(RXRDY)) != 0;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device atmel_serial_drv = {
.name = "atmel_serial",
.start = atmel_serial_init,
@@ -128,34 +127,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &atmel_serial_drv;
}
-#else
-int serial_init(void)
-{
- return atmel_serial_init();
-}
-
-void serial_setbrg(void)
-{
- atmel_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- atmel_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- atmel_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return atmel_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return atmel_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 536fd466ed0..02429b55416 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -83,7 +83,6 @@ static void lpc32xx_serial_puts(const char *s)
serial_putc(*s++);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device lpc32xx_serial_drv = {
.name = "lpc32xx_serial",
.start = lpc32xx_serial_init,
@@ -104,34 +103,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &lpc32xx_serial_drv;
}
-#else
-int serial_init(void)
-{
- return lpc32xx_serial_init();
-}
-
-void serial_setbrg(void)
-{
- lpc32xx_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- lpc32xx_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- lpc32xx_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return lpc32xx_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return lpc32xx_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 7e0b7654e8a..00a71146911 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -130,7 +130,6 @@ static void mcf_serial_setbrg(void)
uart->ucr = UART_UCR_RX_ENABLED | UART_UCR_TX_ENABLED;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mcf_serial_drv = {
.name = "mcf_serial",
.start = mcf_serial_init,
@@ -151,34 +150,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &mcf_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mcf_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mcf_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mcf_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mcf_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mcf_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mcf_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/ns9750_serial.c b/drivers/serial/ns9750_serial.c
index 829f6d580c3..cb545c40657 100644
--- a/drivers/serial/ns9750_serial.c
+++ b/drivers/serial/ns9750_serial.c
@@ -209,7 +209,6 @@ static unsigned int calcRxCharGapRegister( void )
return NS9750_SER_RX_CHAR_TIMER_TRUN;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device ns9750_serial_drv = {
.name = "ns9750_serial",
.start = ns9750_serial_init,
@@ -230,34 +229,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &ns9750_serial_drv;
}
-#else
-int serial_init(void)
-{
- return ns9750_serial_init();
-}
-
-void serial_setbrg(void)
-{
- ns9750_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- ns9750_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- ns9750_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return ns9750_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return ns9750_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/opencores_yanu.c b/drivers/serial/opencores_yanu.c
index a0dd301e947..49bccf3a6cd 100644
--- a/drivers/serial/opencores_yanu.c
+++ b/drivers/serial/opencores_yanu.c
@@ -189,7 +189,6 @@ statoc int oc_serial_getc(void)
return(readl(&uart->data) & YANU_DATA_CHAR_MASK);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device oc_serial_drv = {
.name = "oc_serial",
.start = oc_serial_init,
@@ -210,34 +209,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &oc_serial_drv;
}
-#else
-int serial_init(void)
-{
- return oc_serial_init();
-}
-
-void serial_setbrg(void)
-{
- oc_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- oc_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- oc_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return oc_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return oc_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/s3c4510b_uart.c b/drivers/serial/s3c4510b_uart.c
index 4f7f98e5620..423d26e6788 100644
--- a/drivers/serial/s3c4510b_uart.c
+++ b/drivers/serial/s3c4510b_uart.c
@@ -211,7 +211,6 @@ static void s3c4510b_serial_puts(const char *s)
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device s3c4510b_serial_drv = {
.name = "s3c4510b_serial",
.start = s3c4510b_serial_init,
@@ -232,34 +231,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &s3c4510b_serial_drv;
}
-#else
-int serial_init(void)
-{
- return s3c4510b_serial_init();
-}
-
-void serial_setbrg(void)
-{
- s3c4510b_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- s3c4510b_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- s3c4510b_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return s3c4510b_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return s3c4510b_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/s3c64xx.c b/drivers/serial/s3c64xx.c
index 823425bbeac..9ab8a28d838 100644
--- a/drivers/serial/s3c64xx.c
+++ b/drivers/serial/s3c64xx.c
@@ -172,7 +172,6 @@ static void s3c64xx_serial_puts(const char *s)
serial_putc(*s++);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device s3c64xx_serial_drv = {
.name = "s3c64xx_serial",
.start = s3c64xx_serial_init,
@@ -193,34 +192,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &s3c64xx_serial_drv;
}
-#else
-int serial_init(void)
-{
- return s3c64xx_serial_init();
-}
-
-void serial_setbrg(void)
-{
- s3c64xx_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- s3c64xx_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- s3c64xx_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return s3c64xx_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return s3c64xx_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index d60fbba23fe..cb19401df6c 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -64,7 +64,6 @@ static int sandbox_serial_tstc(void)
return 0;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device sandbox_serial_drv = {
.name = "sandbox_serial",
.start = sandbox_serial_init,
@@ -85,34 +84,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &sandbox_serial_drv;
}
-#else
-int serial_init(void)
-{
- return sandbox_serial_init();
-}
-
-void serial_setbrg(void)
-{
- sandbox_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- sandbox_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- sandbox_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return sandbox_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return sandbox_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_clps7111.c b/drivers/serial/serial_clps7111.c
index e1bed90f945..65473e86080 100644
--- a/drivers/serial/serial_clps7111.c
+++ b/drivers/serial/serial_clps7111.c
@@ -119,7 +119,6 @@ static void clps7111_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device clps7111_serial_drv = {
.name = "clps7111_serial",
.start = clps7111_serial_init,
@@ -140,34 +139,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &clps7111_serial_drv;
}
-#else
-int serial_init(void)
-{
- return clps7111_serial_init();
-}
-
-void serial_setbrg(void)
-{
- clps7111_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- clps7111_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- clps7111_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return clps7111_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return clps7111_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index d37ec29bd9f..6c075b5b912 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -221,7 +221,6 @@ static void imx_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device imx_serial_drv = {
.name = "imx_serial",
.start = imx_serial_init,
@@ -242,34 +241,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
diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c
index 6e3f7f074c9..c8b3658d475 100644
--- a/drivers/serial/serial_ixp.c
+++ b/drivers/serial/serial_ixp.c
@@ -128,7 +128,6 @@ static void ixp_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device ixp_serial_drv = {
.name = "ixp_serial",
.start = ixp_serial_init,
@@ -149,34 +148,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &ixp_serial_drv;
}
-#else
-int serial_init(void)
-{
- return ixp_serial_init();
-}
-
-void serial_setbrg(void)
-{
- ixp_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- ixp_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- ixp_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return ixp_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return ixp_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index b3af388942d..60e8007201d 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -118,7 +118,6 @@ static int ks8695_serial_getc(void)
return (uartp->RX);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device ks8695_serial_drv = {
.name = "ks8695_serial",
.start = ks8695_serial_init,
@@ -139,34 +138,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &ks8695_serial_drv;
}
-#else
-int serial_init(void)
-{
- return ks8695_serial_init();
-}
-
-void serial_setbrg(void)
-{
- ks8695_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- ks8695_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- ks8695_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return ks8695_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return ks8695_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 6b73606f5eb..6c9628581b4 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -182,7 +182,6 @@ static void lh7a40x_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device lh7a40x_serial_drv = {
.name = "lh7a40x_serial",
.start = lh7a40x_serial_init,
@@ -203,34 +202,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &lh7a40x_serial_drv;
}
-#else
-int serial_init(void)
-{
- return lh7a40x_serial_init();
-}
-
-void serial_setbrg(void)
-{
- lh7a40x_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- lh7a40x_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- lh7a40x_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return lh7a40x_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return lh7a40x_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_lpc2292.c b/drivers/serial/serial_lpc2292.c
index 2601ee79c33..fcab20280ec 100644
--- a/drivers/serial/serial_lpc2292.c
+++ b/drivers/serial/serial_lpc2292.c
@@ -102,7 +102,6 @@ static int lpc2292_serial_tstc(void)
return (GET8(U0LSR) & 1);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device lpc2292_serial_drv = {
.name = "lpc2292_serial",
.start = lpc2292_serial_init,
@@ -123,34 +122,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &lpc2292_serial_drv;
}
-#else
-int serial_init(void)
-{
- return lpc2292_serial_init();
-}
-
-void serial_setbrg(void)
-{
- lpc2292_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- lpc2292_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- lpc2292_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return lpc2292_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return lpc2292_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_max3100.c b/drivers/serial/serial_max3100.c
index b21fba06916..3533cfc6d77 100644
--- a/drivers/serial/serial_max3100.c
+++ b/drivers/serial/serial_max3100.c
@@ -288,7 +288,6 @@ static void max3100_serial_setbrg(void)
{
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device max3100_serial_drv = {
.name = "max3100_serial",
.start = max3100_serial_init,
@@ -309,34 +308,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &max3100_serial_drv;
}
-#else
-int serial_init(void)
-{
- return max3100_serial_init();
-}
-
-void serial_setbrg(void)
-{
- max3100_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- max3100_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- max3100_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return max3100_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return max3100_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 0899e9bc812..b0612f5aca9 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -32,10 +32,6 @@
#define UART_PHYS CONFIG_MXC_UART_BASE
-#ifdef CONFIG_SERIAL_MULTI
-#warning "MXC driver does not support MULTI serials."
-#endif
-
/* Register definitions */
#define URXD 0x0 /* Receiver Register */
#define UTXD 0x40 /* Transmitter Register */
@@ -226,7 +222,6 @@ static int mxc_serial_init(void)
return 0;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device mxc_serial_drv = {
.name = "mxc_serial",
.start = mxc_serial_init,
@@ -247,34 +242,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &mxc_serial_drv;
}
-#else
-int serial_init(void)
-{
- return mxc_serial_init();
-}
-
-void serial_setbrg(void)
-{
- mxc_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- mxc_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- mxc_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return mxc_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return mxc_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_netarm.c b/drivers/serial/serial_netarm.c
index ff6612d36ec..d30adc31838 100644
--- a/drivers/serial/serial_netarm.c
+++ b/drivers/serial/serial_netarm.c
@@ -189,7 +189,6 @@ static void netarm_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device netarm_serial_drv = {
.name = "netarm_serial",
.start = netarm_serial_init,
@@ -210,34 +209,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &netarm_serial_drv;
}
-#else
-int serial_init(void)
-{
- return netarm_serial_init();
-}
-
-void serial_setbrg(void)
-{
- netarm_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- netarm_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- netarm_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return netarm_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return netarm_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 00ad97c35b8..b5d12481ca8 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -29,20 +29,11 @@
#include <ns87308.h>
#endif
-#if defined (CONFIG_SERIAL_MULTI)
#include <serial.h>
-#endif
DECLARE_GLOBAL_DATA_PTR;
#if !defined(CONFIG_CONS_INDEX)
-#if defined (CONFIG_SERIAL_MULTI)
-/* with CONFIG_SERIAL_MULTI we might have no console
- * on these devices
- */
-#else
-#error "No console index specified."
-#endif /* CONFIG_SERIAL_MULTI */
#elif (CONFIG_CONS_INDEX < 1) || (CONFIG_CONS_INDEX > 4)
#error "Invalid console index value."
#endif
@@ -85,8 +76,6 @@ static NS16550_t serial_ports[4] = {
#define PORT serial_ports[port-1]
-#if defined(CONFIG_SERIAL_MULTI)
-
/* Multi serial device functions */
#define DECLARE_ESERIAL_FUNCTIONS(port) \
int eserial##port##_init (void) {\
@@ -117,8 +106,6 @@ static NS16550_t serial_ports[4] = {
.puts = eserial##port##_puts, \
}
-#endif /* CONFIG_SERIAL_MULTI */
-
static int calc_divisor (NS16550_t port)
{
#ifdef CONFIG_OMAP1510
@@ -151,36 +138,6 @@ static int calc_divisor (NS16550_t port)
(MODE_X_DIV * gd->baudrate);
}
-#if !defined(CONFIG_SERIAL_MULTI)
-int serial_init (void)
-{
- int clock_divisor;
-
-#ifdef CONFIG_NS87308
- initialise_ns87308();
-#endif
-
-#ifdef CONFIG_SYS_NS16550_COM1
- clock_divisor = calc_divisor(serial_ports[0]);
- NS16550_init(serial_ports[0], clock_divisor);
-#endif
-#ifdef CONFIG_SYS_NS16550_COM2
- clock_divisor = calc_divisor(serial_ports[1]);
- NS16550_init(serial_ports[1], clock_divisor);
-#endif
-#ifdef CONFIG_SYS_NS16550_COM3
- clock_divisor = calc_divisor(serial_ports[2]);
- NS16550_init(serial_ports[2], clock_divisor);
-#endif
-#ifdef CONFIG_SYS_NS16550_COM4
- clock_divisor = calc_divisor(serial_ports[3]);
- NS16550_init(serial_ports[3], clock_divisor);
-#endif
-
- return (0);
-}
-#endif
-
void
_serial_putc(const char c,const int port)
{
@@ -226,91 +183,41 @@ _serial_setbrg (const int port)
NS16550_reinit(PORT, clock_divisor);
}
-#if defined(CONFIG_SERIAL_MULTI)
static inline void
serial_putc_dev(unsigned int dev_index,const char c)
{
_serial_putc(c,dev_index);
}
-#else
-void
-serial_putc(const char c)
-{
- _serial_putc(c,CONFIG_CONS_INDEX);
-}
-#endif
-#if defined(CONFIG_SERIAL_MULTI)
static inline void
serial_putc_raw_dev(unsigned int dev_index,const char c)
{
_serial_putc_raw(c,dev_index);
}
-#else
-void
-serial_putc_raw(const char c)
-{
- _serial_putc_raw(c,CONFIG_CONS_INDEX);
-}
-#endif
-#if defined(CONFIG_SERIAL_MULTI)
static inline void
serial_puts_dev(unsigned int dev_index,const char *s)
{
_serial_puts(s,dev_index);
}
-#else
-void
-serial_puts(const char *s)
-{
- _serial_puts(s,CONFIG_CONS_INDEX);
-}
-#endif
-#if defined(CONFIG_SERIAL_MULTI)
static inline int
serial_getc_dev(unsigned int dev_index)
{
return _serial_getc(dev_index);
}
-#else
-int
-serial_getc(void)
-{
- return _serial_getc(CONFIG_CONS_INDEX);
-}
-#endif
-#if defined(CONFIG_SERIAL_MULTI)
static inline int
serial_tstc_dev(unsigned int dev_index)
{
return _serial_tstc(dev_index);
}
-#else
-int
-serial_tstc(void)
-{
- return _serial_tstc(CONFIG_CONS_INDEX);
-}
-#endif
-#if defined(CONFIG_SERIAL_MULTI)
static inline void
serial_setbrg_dev(unsigned int dev_index)
{
_serial_setbrg(dev_index);
}
-#else
-void
-serial_setbrg(void)
-{
- _serial_setbrg(CONFIG_CONS_INDEX);
-}
-#endif
-
-#if defined(CONFIG_SERIAL_MULTI)
DECLARE_ESERIAL_FUNCTIONS(1);
struct serial_device eserial1_device =
@@ -355,5 +262,3 @@ void ns16550_serial_initialize(void)
serial_register(&eserial4_device);
#endif
}
-
-#endif /* CONFIG_SERIAL_MULTI */
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index beb0c98b23f..7db7b65c3fd 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -253,7 +253,6 @@ static int pl01x_tstc (int portnum)
return !(readl(&regs->fr) & UART_PL01x_FR_RXFE);
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device pl01x_serial_drv = {
.name = "pl01x_serial",
.start = pl01x_serial_init,
@@ -274,34 +273,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &pl01x_serial_drv;
}
-#else
-int serial_init(void)
-{
- return pl01x_serial_init();
-}
-
-void serial_setbrg(void)
-{
- pl01x_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- pl01x_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- pl01x_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return pl01x_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return pl01x_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index 46d76894e68..ad391004b95 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -73,20 +73,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define HWUART_INDEX 0xff
#endif
-#ifndef CONFIG_SERIAL_MULTI
-#if defined(CONFIG_FFUART)
-#define UART_INDEX FFUART_INDEX
-#elif defined(CONFIG_BTUART)
-#define UART_INDEX BTUART_INDEX
-#elif defined(CONFIG_STUART)
-#define UART_INDEX STUART_INDEX
-#elif defined(CONFIG_HWUART)
-#define UART_INDEX HWUART_INDEX
-#else
-#error "Please select CONFIG_(FF|BT|ST|HW)UART in board config file."
-#endif
-#endif
-
static uint32_t pxa_uart_get_baud_divider(void)
{
if (gd->baudrate == 1200)
@@ -297,9 +283,6 @@ void pxa_puts_dev(unsigned int uart_index, const char *s)
pxa_uart_multi(btuart, BTUART)
#endif
-#ifndef CONFIG_SERIAL_MULTI
- pxa_uart(serial, UART)
-#else
__weak struct serial_device *default_serial_console(void)
{
#if CONFIG_CONS_INDEX == 1
@@ -327,4 +310,3 @@ void pxa_serial_initialize(void)
serial_register(&serial_stuart_device);
#endif
}
-#endif
diff --git a/drivers/serial/serial_s3c24x0.c b/drivers/serial/serial_s3c24x0.c
index 625c6b7d0c5..4d214c396f7 100644
--- a/drivers/serial/serial_s3c24x0.c
+++ b/drivers/serial/serial_s3c24x0.c
@@ -38,8 +38,6 @@ DECLARE_GLOBAL_DATA_PTR;
#endif
#include <asm/io.h>
-
-#if defined(CONFIG_SERIAL_MULTI)
#include <serial.h>
/* Multi serial device functions */
@@ -80,8 +78,6 @@ DECLARE_GLOBAL_DATA_PTR;
.puts = s3serial##port##_puts, \
}
-#endif /* CONFIG_SERIAL_MULTI */
-
#ifdef CONFIG_HWFLOW
static int hwflow;
#endif
@@ -100,18 +96,10 @@ void _serial_setbrg(const int dev_index)
/* Delay */ ;
}
-#if defined(CONFIG_SERIAL_MULTI)
static inline void serial_setbrg_dev(unsigned int dev_index)
{
_serial_setbrg(dev_index);
}
-#else
-void serial_setbrg(void)
-{
- _serial_setbrg(UART_NR);
-}
-#endif
-
/* Initialise the serial port. The settings are always 8 data bits, no parity,
* 1 stop bit, no start bits.
@@ -151,16 +139,6 @@ static int serial_init_dev(const int dev_index)
return (0);
}
-#if !defined(CONFIG_SERIAL_MULTI)
-/* Initialise the serial port. The settings are always 8 data bits, no parity,
- * 1 stop bit, no start bits.
- */
-int serial_init(void)
-{
- return serial_init_dev(UART_NR);
-}
-#endif
-
/*
* Read a single byte from the serial port. Returns 1 on success, 0
* otherwise. When the function is succesfull, the character read is
@@ -176,17 +154,10 @@ int _serial_getc(const int dev_index)
return readb(&uart->urxh) & 0xff;
}
-#if defined(CONFIG_SERIAL_MULTI)
static inline int serial_getc_dev(unsigned int dev_index)
{
return _serial_getc(dev_index);
}
-#else
-int serial_getc(void)
-{
- return _serial_getc(UART_NR);
-}
-#endif
#ifdef CONFIG_HWFLOW
int hwflow_onoff(int on)
@@ -246,18 +217,10 @@ void _serial_putc(const char c, const int dev_index)
serial_putc('\r');
}
-#if defined(CONFIG_SERIAL_MULTI)
static inline void serial_putc_dev(unsigned int dev_index, const char c)
{
_serial_putc(c, dev_index);
}
-#else
-void serial_putc(const char c)
-{
- _serial_putc(c, UART_NR);
-}
-#endif
-
/*
* Test whether a character is in the RX buffer
@@ -269,17 +232,10 @@ int _serial_tstc(const int dev_index)
return readl(&uart->utrstat) & 0x1;
}
-#if defined(CONFIG_SERIAL_MULTI)
static inline int serial_tstc_dev(unsigned int dev_index)
{
return _serial_tstc(dev_index);
}
-#else
-int serial_tstc(void)
-{
- return _serial_tstc(UART_NR);
-}
-#endif
void _serial_puts(const char *s, const int dev_index)
{
@@ -288,19 +244,11 @@ void _serial_puts(const char *s, const int dev_index)
}
}
-#if defined(CONFIG_SERIAL_MULTI)
static inline void serial_puts_dev(int dev_index, const char *s)
{
_serial_puts(s, dev_index);
}
-#else
-void serial_puts(const char *s)
-{
- _serial_puts(s, UART_NR);
-}
-#endif
-#if defined(CONFIG_SERIAL_MULTI)
DECLARE_S3C_SERIAL_FUNCTIONS(0);
struct serial_device s3c24xx_serial0_device =
INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0");
@@ -330,4 +278,3 @@ void s3c24xx_serial_initialize(void)
serial_register(&s3c24xx_serial1_device);
serial_register(&s3c24xx_serial2_device);
}
-#endif /* CONFIG_SERIAL_MULTI */
diff --git a/drivers/serial/serial_s3c44b0.c b/drivers/serial/serial_s3c44b0.c
index 8beba1abc82..a4428e0f473 100644
--- a/drivers/serial/serial_s3c44b0.c
+++ b/drivers/serial/serial_s3c44b0.c
@@ -216,7 +216,6 @@ static void s3c44b0_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device s3c44b0_serial_drv = {
.name = "s3c44b0_serial",
.start = s3c44b0_serial_init,
@@ -237,34 +236,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &s3c44b0_serial_drv;
}
-#else
-int serial_init(void)
-{
- return s3c44b0_serial_init();
-}
-
-void serial_setbrg(void)
-{
- s3c44b0_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- s3c44b0_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- s3c44b0_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return s3c44b0_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return s3c44b0_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_sa1100.c b/drivers/serial/serial_sa1100.c
index 86e682d44d4..c6b34db7c61 100644
--- a/drivers/serial/serial_sa1100.c
+++ b/drivers/serial/serial_sa1100.c
@@ -160,7 +160,6 @@ static void sa1100_serial_puts(const char *s)
}
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device sa1100_serial_drv = {
.name = "sa1100_serial",
.start = sa1100_serial_init,
@@ -181,34 +180,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &sa1100_serial_drv;
}
-#else
-int serial_init(void)
-{
- return sa1100_serial_init();
-}
-
-void serial_setbrg(void)
-{
- sa1100_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- sa1100_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- sa1100_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return sa1100_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return sa1100_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index bcf246854f9..1ddfc7d87f6 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -190,7 +190,6 @@ static int sh_serial_getc(void)
return ch;
}
-#ifdef CONFIG_SERIAL_MULTI
static struct serial_device sh_serial_drv = {
.name = "sh_serial",
.start = sh_serial_init,
@@ -211,34 +210,3 @@ __weak struct serial_device *default_serial_console(void)
{
return &sh_serial_drv;
}
-#else
-int serial_init(void)
-{
- return sh_serial_init();
-}
-
-void serial_setbrg(void)
-{
- sh_serial_setbrg();
-}
-
-void serial_putc(const char c)
-{
- sh_serial_putc(c);
-}
-
-void serial_puts(const char *s)
-{
- sh_serial_puts(s);
-}
-
-int serial_getc(void)
-{
- return sh_serial_getc();
-}
-
-int serial_tstc(void)
-{
- return sh_serial_tstc();
-}
-#endif
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 164497e6162..9cc0b7f1d21 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -96,39 +96,6 @@ static int uartlite_serial_init(const int port)
return -1;
}
-#if !defined(CONFIG_SERIAL_MULTI)
-int serial_init(void)
-{
- return uartlite_serial_init(0);
-}
-
-void serial_setbrg(void)
-{
- /* FIXME: what's this for? */
-}
-
-void serial_putc(const char c)
-{
- uartlite_serial_putc(c, 0);
-}
-
-void serial_puts(const char *s)
-{
- uartlite_serial_puts(s, 0);
-}
-
-int serial_getc(void)
-{
- return uartlite_serial_getc(0);
-}
-
-int serial_tstc(void)
-{
- return uartlite_serial_tstc(0);
-}
-#endif
-
-#if defined(CONFIG_SERIAL_MULTI)
/* Multi serial device functions */
#define DECLARE_ESERIAL_FUNCTIONS(port) \
int userial##port##_init(void) \
@@ -197,4 +164,3 @@ void uartlite_serial_initialize(void)
serial_register(&uartlite_serial3_device);
#endif /* XILINX_UARTLITE_BASEADDR3 */
}
-#endif /* CONFIG_SERIAL_MULTI */
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 5ac2561081f..c09aa271b5c 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -170,37 +170,6 @@ static int uart_zynq_serial_getc(const int port)
return readl(&regs->tx_rx_fifo);
}
-#if !defined(CONFIG_SERIAL_MULTI)
-int serial_init(void)
-{
- return uart_zynq_serial_init(0);
-}
-
-void serial_setbrg(void)
-{
- uart_zynq_serial_setbrg(0);
-}
-
-void serial_putc(const char c)
-{
- uart_zynq_serial_putc(c, 0);
-}
-
-void serial_puts(const char *s)
-{
- uart_zynq_serial_puts(s, 0);
-}
-
-int serial_getc(void)
-{
- return uart_zynq_serial_getc(0);
-}
-
-int serial_tstc(void)
-{
- return uart_zynq_serial_tstc(0);
-}
-#else
/* Multi serial device functions */
#define DECLARE_PSSERIAL_FUNCTIONS(port) \
int uart_zynq##port##_init(void) \
@@ -244,7 +213,6 @@ __weak struct serial_device *default_serial_console(void)
return NULL;
}
-#endif
void zynq_serial_initalize(void)
{