diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-31 18:32:53 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-31 18:32:53 +0200 |
commit | d87080b721e4f8dca977af7571c5338ae7bb8db7 (patch) | |
tree | 514fc21eec39a2dd57f7aea516844a4400f8f140 /common/serial.c | |
parent | f6dbbe986481cff01334c64cacb971a5f237a9a9 (diff) | |
download | u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.zip u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.gz u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.bz2 |
GCC-4.x fixes: clean up global data pointer initialization for all boards.
Diffstat (limited to 'common/serial.c')
-rw-r--r-- | common/serial.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/common/serial.c b/common/serial.c index 22d8fd0..2acbd08 100644 --- a/common/serial.c +++ b/common/serial.c @@ -25,6 +25,8 @@ #include <serial.h> #include <devices.h> +DECLARE_GLOBAL_DATA_PTR; + #if defined(CONFIG_SERIAL_MULTI) static struct serial_device *serial_devices = NULL; @@ -49,8 +51,6 @@ struct serial_device *default_serial_console (void) static int serial_register (struct serial_device *dev) { - DECLARE_GLOBAL_DATA_PTR; - dev->init += gd->reloc_off; dev->setbrg += gd->reloc_off; dev->getc += gd->reloc_off; @@ -131,8 +131,6 @@ void serial_reinit_all (void) int serial_init (void) { - DECLARE_GLOBAL_DATA_PTR; - if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); @@ -144,8 +142,6 @@ int serial_init (void) void serial_setbrg (void) { - DECLARE_GLOBAL_DATA_PTR; - if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); @@ -158,8 +154,6 @@ void serial_setbrg (void) int serial_getc (void) { - DECLARE_GLOBAL_DATA_PTR; - if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); @@ -171,8 +165,6 @@ int serial_getc (void) int serial_tstc (void) { - DECLARE_GLOBAL_DATA_PTR; - if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); @@ -184,8 +176,6 @@ int serial_tstc (void) void serial_putc (const char c) { - DECLARE_GLOBAL_DATA_PTR; - if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); @@ -198,8 +188,6 @@ void serial_putc (const char c) void serial_puts (const char *s) { - DECLARE_GLOBAL_DATA_PTR; - if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); |