summaryrefslogtreecommitdiff
path: root/drivers/serial
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 /drivers/serial
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>
Diffstat (limited to 'drivers/serial')
-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
28 files changed, 0 insertions, 972 deletions
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 8cb4606d37..654b5019eb 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 1d0dd6929c..27550ed48d 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 d49d5d4356..130303129e 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 536fd466ed..02429b5541 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 7e0b7654e8..00a7114691 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 829f6d580c..cb545c4065 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 a0dd301e94..49bccf3a6c 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 4f7f98e562..423d26e678 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 823425bbea..9ab8a28d83 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 d60fbba23f..cb19401df6 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 e1bed90f94..65473e8608 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 d37ec29bd9..6c075b5b91 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 6e3f7f074c..c8b3658d47 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 b3af388942..60e8007201 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 6b73606f5e..6c9628581b 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 2601ee79c3..fcab20280e 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 b21fba0691..3533cfc6d7 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 0899e9bc81..b0612f5aca 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 ff6612d36e..d30adc3183 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 00ad97c35b..b5d12481ca 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 beb0c98b23..7db7b65c3f 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 46d76894e6..ad391004b9 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 625c6b7d0c..4d214c396f 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 8beba1abc8..a4428e0f47 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 86e682d44d..c6b34db7c6 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 bcf246854f..1ddfc7d87f 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 164497e616..9cc0b7f1d2 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 5ac2561081..c09aa271b5 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)
{