]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/env_common.c
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin
[karo-tx-uboot.git] / common / env_common.c
index be64d1307b96441ba184e080263541d7860f7dd2..82e4936ced54182c3f97cb8cf06d8d96284ab5ba 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_AMIGAONEG3SE
-       extern void enable_nvram(void);
-       extern void disable_nvram(void);
-#endif
-
 #undef DEBUG_ENV
 #ifdef DEBUG_ENV
 #define DEBUGF(fmt,args...) printf(fmt ,##args)
@@ -159,20 +154,6 @@ static uchar env_get_char_init (int index)
        return (c);
 }
 
-#ifdef CONFIG_AMIGAONEG3SE
-uchar env_get_char_memory (int index)
-{
-       uchar retval;
-       enable_nvram();
-       if (gd->env_valid) {
-               retval = ( *((uchar *)(gd->env_addr + index)) );
-       } else {
-               retval = ( default_environment[index] );
-       }
-       disable_nvram();
-       return retval;
-}
-#else
 uchar env_get_char_memory (int index)
 {
        if (gd->env_valid) {
@@ -181,7 +162,6 @@ uchar env_get_char_memory (int index)
                return ( default_environment[index] );
        }
 }
-#endif
 
 uchar env_get_char (int index)
 {
@@ -224,11 +204,9 @@ void set_default_env(void)
 
 void env_relocate (void)
 {
+#ifndef CONFIG_RELOC_FIXUP_WORKS
        DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
                gd->reloc_off);
-
-#ifdef CONFIG_AMIGAONEG3SE
-       enable_nvram();
 #endif
 
 #ifdef ENV_IS_EMBEDDED
@@ -236,7 +214,9 @@ void env_relocate (void)
         * The environment buffer is embedded with the text segment,
         * just relocate the environment pointer
         */
+#ifndef CONFIG_RELOC_FIXUP_WORKS
        env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
+#endif
        DEBUGF ("%s[%d] embedded ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
 #else
        /*
@@ -259,10 +239,6 @@ void env_relocate (void)
                env_relocate_spec ();
        }
        gd->env_addr = (ulong)&(env_ptr->data);
-
-#ifdef CONFIG_AMIGAONEG3SE
-       disable_nvram();
-#endif
 }
 
 #ifdef CONFIG_AUTO_COMPLETE