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/env_common.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/env_common.c')
-rw-r--r-- | common/env_common.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/common/env_common.c b/common/env_common.c index 3201135..eb33422 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -37,6 +37,8 @@ # define SHOW_BOOT_PROGRESS(arg) #endif +DECLARE_GLOBAL_DATA_PTR; + #ifdef CONFIG_AMIGAONEG3SE extern void enable_nvram(void); extern void disable_nvram(void); @@ -150,7 +152,6 @@ void env_crc_update (void) static uchar env_get_char_init (int index) { - DECLARE_GLOBAL_DATA_PTR; uchar c; /* if crc was bad, use the default environment */ @@ -167,7 +168,6 @@ static uchar env_get_char_init (int index) #ifdef CONFIG_AMIGAONEG3SE uchar env_get_char_memory (int index) { - DECLARE_GLOBAL_DATA_PTR; uchar retval; enable_nvram(); if (gd->env_valid) { @@ -181,8 +181,6 @@ uchar env_get_char_memory (int index) #else uchar env_get_char_memory (int index) { - DECLARE_GLOBAL_DATA_PTR; - if (gd->env_valid) { return ( *((uchar *)(gd->env_addr + index)) ); } else { @@ -193,8 +191,6 @@ uchar env_get_char_memory (int index) uchar *env_get_addr (int index) { - DECLARE_GLOBAL_DATA_PTR; - if (gd->env_valid) { return ( ((uchar *)(gd->env_addr + index)) ); } else { @@ -204,8 +200,6 @@ uchar *env_get_addr (int index) void env_relocate (void) { - DECLARE_GLOBAL_DATA_PTR; - DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__, gd->reloc_off); |