summaryrefslogtreecommitdiffstats
path: root/common/env_flash.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-04-20 12:25:10 -0500
committerKumar Gala <galak@kernel.crashing.org>2006-04-20 12:25:10 -0500
commitb86d7622b33892b1dafe761a7a9eaeeab9f3816b (patch)
tree56b1b6fc978166abce4afa8e9dee0af94bfc3cd6 /common/env_flash.c
parentf8edca2e9a128f526b1fe6f997f7adb852cf5b3c (diff)
parent56a4a63c106cc317fc0fe42686a99416fc469f5b (diff)
downloadbootable_bootloader_goldelico_gta04-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.zip
bootable_bootloader_goldelico_gta04-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.tar.gz
bootable_bootloader_goldelico_gta04-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.tar.bz2
Merge branch 'master' of rsync://rsync.denx.de/git/u-boot
Diffstat (limited to 'common/env_flash.c')
-rw-r--r--common/env_flash.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/env_flash.c b/common/env_flash.c
index a2ea9c4..1674b30 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -35,6 +35,8 @@
#include <linux/stddef.h>
#include <malloc.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#if ((CONFIG_COMMANDS&(CFG_CMD_ENV|CFG_CMD_FLASH)) == (CFG_CMD_ENV|CFG_CMD_FLASH))
#define CMD_SAVEENV
#elif defined(CFG_ENV_ADDR_REDUND)
@@ -89,8 +91,6 @@ extern int default_environment_size;
uchar env_get_char_spec (int index)
{
- DECLARE_GLOBAL_DATA_PTR;
-
return ( *((uchar *)(gd->env_addr + index)) );
}
@@ -98,7 +98,6 @@ uchar env_get_char_spec (int index)
int env_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
int crc1_ok = 0, crc2_ok = 0;
uchar flag1 = flash_addr->flags;
@@ -260,7 +259,6 @@ Done:
int env_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_OMAP2420H4
int flash_probe(void);
@@ -358,8 +356,6 @@ void env_relocate_spec (void)
{
#if !defined(ENV_IS_EMBEDDED) || defined(CFG_ENV_ADDR_REDUND)
#ifdef CFG_ENV_ADDR_REDUND
- DECLARE_GLOBAL_DATA_PTR;
-
if (gd->env_addr != (ulong)&(flash_addr->data)) {
env_t * etmp = flash_addr;
ulong ltmp = end_addr;