summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2007-12-27 16:57:23 +0100
committerWolfgang Denk <wd@denx.de>2008-01-09 13:27:39 +0100
commit1208a2dfde02bedd3c5bda29a606632b8e0be058 (patch)
tree158c20760e0c4dee8094a4d9d27c280b2c6857bf /common
parentd16471ee05ce7ac5392bc0e9fe3ff4b58a768f33 (diff)
downloadu-boot-imx-1208a2dfde02bedd3c5bda29a606632b8e0be058.zip
u-boot-imx-1208a2dfde02bedd3c5bda29a606632b8e0be058.tar.gz
u-boot-imx-1208a2dfde02bedd3c5bda29a606632b8e0be058.tar.bz2
serial: Make default_serial_console() a weak function
With this patch it is possible to reimplement default_serial_console() in board specific code. This will be done in the upcomming PMC440 U-Boot port. This also allows the lwmon board maintainer to remove the '#if !defined(CONFIG_LWMON) ...' from common/serial.c. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Diffstat (limited to 'common')
-rw-r--r--common/serial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/serial.c b/common/serial.c
index b9916e2..5601080 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -33,7 +33,7 @@ static struct serial_device *serial_devices = NULL;
static struct serial_device *serial_current = NULL;
#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA27X)
-struct serial_device *default_serial_console (void)
+struct serial_device *__default_serial_console (void)
{
#if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)
return &serial_smc_device;
@@ -64,6 +64,8 @@ struct serial_device *default_serial_console (void)
#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)