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 /cpu/i386/serial.c | |
parent | f6dbbe986481cff01334c64cacb971a5f237a9a9 (diff) |
GCC-4.x fixes: clean up global data pointer initialization for all boards.
Diffstat (limited to 'cpu/i386/serial.c')
-rw-r--r-- | cpu/i386/serial.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cpu/i386/serial.c b/cpu/i386/serial.c index db13008ba5..e7299a7ebb 100644 --- a/cpu/i386/serial.c +++ b/cpu/i386/serial.c @@ -55,6 +55,8 @@ #include <malloc.h> #endif +DECLARE_GLOBAL_DATA_PTR; + #define UART_RBR 0x00 #define UART_THR 0x00 #define UART_IER 0x01 @@ -126,13 +128,9 @@ static int serial_div(int baudrate) int serial_init(void) { - DECLARE_GLOBAL_DATA_PTR; - volatile char val; - int bdiv = serial_div(gd->baudrate); - outb(0x80, UART0_BASE + UART_LCR); /* set DLAB bit */ outb(bdiv, UART0_BASE + UART_DLL); /* set baudrate divisor */ outb(bdiv >> 8, UART0_BASE + UART_DLM);/* set baudrate divisor */ @@ -150,8 +148,6 @@ int serial_init(void) void serial_setbrg(void) { - DECLARE_GLOBAL_DATA_PTR; - unsigned short bdiv; bdiv = serial_div(gd->baudrate); @@ -410,8 +406,6 @@ int serial_buffered_tstc(void) #if (CONFIG_KGDB_SER_INDEX & 2) void kgdb_serial_init(void) { - DECLARE_GLOBAL_DATA_PTR; - volatile char val; bdiv = serial_div (CONFIG_KGDB_BAUDRATE); |