summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-29 18:03:29 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 16:37:57 +0200
commit6c768ca746c341dd6acbb8b39f48acb48e964d83 (patch)
tree1c20bed09fe9e70e525a2761d660301947f07dae /common
parent6262e4e74e2cdb9f231dc71c9893d4a4bd1e88df (diff)
downloadu-boot-imx-6c768ca746c341dd6acbb8b39f48acb48e964d83.zip
u-boot-imx-6c768ca746c341dd6acbb8b39f48acb48e964d83.tar.gz
u-boot-imx-6c768ca746c341dd6acbb8b39f48acb48e964d83.tar.bz2
serial: push default_serial_console to drivers
Rather than sticking arch/board/driver specific logic in the common serial code, push it all out to the respective drivers. The serial drivers declare these funcs weak so that boards can still override things with their own definition. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com> Tested-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'common')
-rw-r--r--common/serial.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/common/serial.c b/common/serial.c
index 8ebf9a5..505c2c6 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -30,74 +30,6 @@ DECLARE_GLOBAL_DATA_PTR;
static struct serial_device *serial_devices = NULL;
static struct serial_device *serial_current = NULL;
-#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA250) && !defined(CONFIG_PXA27X)
-struct serial_device *__default_serial_console (void)
-{
-#if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)
- return &serial_smc_device;
-#elif defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \
- || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4)
- return &serial_scc_device;
-#elif defined(CONFIG_4xx) \
- || defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) \
- || defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) \
- || defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) \
- || defined(CONFIG_TEGRA2)
-#if defined(CONFIG_CONS_INDEX) && defined(CONFIG_SYS_NS16550_SERIAL)
-#if (CONFIG_CONS_INDEX==1)
- return &eserial1_device;
-#elif (CONFIG_CONS_INDEX==2)
- return &eserial2_device;
-#elif (CONFIG_CONS_INDEX==3)
- return &eserial3_device;
-#elif (CONFIG_CONS_INDEX==4)
- return &eserial4_device;
-#else
-#error "Bad CONFIG_CONS_INDEX."
-#endif
-#else
- return &serial0_device;
-#endif
-#elif defined(CONFIG_MPC512X)
-#if (CONFIG_PSC_CONSOLE == 3)
- return &serial3_device;
-#elif (CONFIG_PSC_CONSOLE == 6)
- return &serial6_device;
-#else
-#error "Bad CONFIG_PSC_CONSOLE."
-#endif
-#elif defined(CONFIG_S3C2410)
-#if defined(CONFIG_SERIAL1)
- return &s3c24xx_serial0_device;
-#elif defined(CONFIG_SERIAL2)
- return &s3c24xx_serial1_device;
-#elif defined(CONFIG_SERIAL3)
- return &s3c24xx_serial2_device;
-#else
-#error "CONFIG_SERIAL? missing."
-#endif
-#elif defined(CONFIG_S5P)
-#if defined(CONFIG_SERIAL0)
- return &s5p_serial0_device;
-#elif defined(CONFIG_SERIAL1)
- return &s5p_serial1_device;
-#elif defined(CONFIG_SERIAL2)
- return &s5p_serial2_device;
-#elif defined(CONFIG_SERIAL3)
- return &s5p_serial3_device;
-#else
-#error "CONFIG_SERIAL? missing."
-#endif
-#elif defined(CONFIG_OMAP3_ZOOM2)
- return ZOOM2_DEFAULT_SERIAL_DEVICE;
-#else
-#error No default console
-#endif
-}
-
-struct serial_device *default_serial_console(void) __attribute__((weak, alias("__default_serial_console")));
-#endif
-
int serial_register (struct serial_device *dev)
{
#ifdef CONFIG_NEEDS_MANUAL_RELOC