summaryrefslogtreecommitdiff
path: root/cpu/i386
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-31 18:32:53 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-03-31 18:32:53 +0200
commitd87080b721e4f8dca977af7571c5338ae7bb8db7 (patch)
tree514fc21eec39a2dd57f7aea516844a4400f8f140 /cpu/i386
parentf6dbbe986481cff01334c64cacb971a5f237a9a9 (diff)
downloadu-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 'cpu/i386')
-rw-r--r--cpu/i386/sc520.c5
-rw-r--r--cpu/i386/serial.c10
2 files changed, 4 insertions, 11 deletions
diff --git a/cpu/i386/sc520.c b/cpu/i386/sc520.c
index 689e775..c83f0bb 100644
--- a/cpu/i386/sc520.c
+++ b/cpu/i386/sc520.c
@@ -36,6 +36,8 @@
#include <asm/pci.h>
#include <asm/ic/sc520.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* utility functions for boards based on the AMD sc520
*
@@ -93,8 +95,6 @@ u32 read_mmcr_long(u16 mmcr)
void init_sc520(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
/* Set the UARTxCTL register at it's slower,
* baud clock giving us a 1.8432 MHz reference
*/
@@ -139,7 +139,6 @@ void init_sc520(void)
unsigned long init_sc520_dram(void)
{
- DECLARE_GLOBAL_DATA_PTR;
bd_t *bd = gd->bd;
u32 dram_present=0;
diff --git a/cpu/i386/serial.c b/cpu/i386/serial.c
index db13008..e7299a7 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);