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>
master
Marek Vasut 12 years ago committed by Tom Rini
parent bffe31c144
commit a382725060
  1. 32
      arch/mips/cpu/mips32/au1x00/au1x00_serial.c
  2. 32
      arch/mips/cpu/mips32/incaip/asc_serial.c
  3. 32
      arch/mips/cpu/xburst/jz_serial.c
  4. 64
      arch/powerpc/cpu/mpc512x/serial.c
  5. 32
      arch/powerpc/cpu/mpc5xx/serial.c
  6. 149
      arch/powerpc/cpu/mpc5xxx/serial.c
  7. 32
      arch/powerpc/cpu/mpc8220/uart.c
  8. 32
      arch/powerpc/cpu/mpc8260/serial_scc.c
  9. 32
      arch/powerpc/cpu/mpc8260/serial_smc.c
  10. 32
      arch/powerpc/cpu/mpc85xx/serial_scc.c
  11. 35
      arch/powerpc/cpu/ppc4xx/iop480_uart.c
  12. 32
      arch/sparc/cpu/leon2/serial.c
  13. 32
      arch/sparc/cpu/leon3/serial.c
  14. 32
      board/Marvell/common/serial.c
  15. 31
      board/amirix/ap1000/serial.c
  16. 32
      board/bmw/serial.c
  17. 32
      board/cogent/serial.c
  18. 31
      board/esd/cpci750/serial.c
  19. 31
      board/evb64260/serial.c
  20. 31
      board/ml2/serial.c
  21. 31
      board/pcippc2/sconsole.c
  22. 6
      board/pdm360ng/pdm360ng.c
  23. 32
      board/prodrive/p3mx/serial.c
  24. 2
      board/trizepsiv/conxs.c
  25. 32
      drivers/serial/altera_jtag_uart.c
  26. 32
      drivers/serial/altera_uart.c
  27. 32
      drivers/serial/atmel_usart.c
  28. 32
      drivers/serial/lpc32xx_hsuart.c
  29. 32
      drivers/serial/mcfuart.c
  30. 32
      drivers/serial/ns9750_serial.c
  31. 32
      drivers/serial/opencores_yanu.c
  32. 32
      drivers/serial/s3c4510b_uart.c
  33. 32
      drivers/serial/s3c64xx.c
  34. 32
      drivers/serial/sandbox.c
  35. 32
      drivers/serial/serial_clps7111.c
  36. 32
      drivers/serial/serial_imx.c
  37. 32
      drivers/serial/serial_ixp.c
  38. 32
      drivers/serial/serial_ks8695.c
  39. 32
      drivers/serial/serial_lh7a40x.c
  40. 32
      drivers/serial/serial_lpc2292.c
  41. 32
      drivers/serial/serial_max3100.c
  42. 36
      drivers/serial/serial_mxc.c
  43. 32
      drivers/serial/serial_netarm.c
  44. 95
      drivers/serial/serial_ns16550.c
  45. 32
      drivers/serial/serial_pl01x.c
  46. 18
      drivers/serial/serial_pxa.c
  47. 53
      drivers/serial/serial_s3c24x0.c
  48. 32
      drivers/serial/serial_s3c44b0.c
  49. 32
      drivers/serial/serial_sa1100.c
  50. 32
      drivers/serial/serial_sh.c
  51. 34
      drivers/serial/serial_xuartlite.c
  52. 32
      drivers/serial/serial_zynq.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

@ -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

@ -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

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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)

@ -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)

@ -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 */

@ -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 */

@ -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

@ -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

@ -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)

@ -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)
{

@ -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

@ -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) && \

@ -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)
{

@ -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)

@ -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)
{

@ -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;

@ -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 */

@ -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)

@ -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;
}

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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 */

@ -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

@ -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

@ -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 */

@ -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

@ -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

@ -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

@ -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 */

@ -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)
{

Loading…
Cancel
Save