X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fenv_common.c;h=82e4936ced54182c3f97cb8cf06d8d96284ab5ba;hb=f12d4cb48a1040c25a55148d0eedee1a896364e6;hp=6be3bb04ac37665d01eb3213015e29a1ea4f4a90;hpb=f61f1e150c84f5b9347fca79a4bc5f2286c545d2;p=karo-tx-uboot.git diff --git a/common/env_common.c b/common/env_common.c index 6be3bb04ac..82e4936ced 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -32,11 +32,6 @@ 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) @@ -139,11 +134,6 @@ uchar default_environment[] = { "\0" }; -#if defined(CONFIG_ENV_IS_IN_NAND) /* Environment is in Nand Flash */ \ - || defined(CONFIG_ENV_IS_IN_SPI_FLASH) -int default_environment_size = sizeof(default_environment); -#endif - void env_crc_update (void) { env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE); @@ -164,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) { @@ -186,7 +162,6 @@ uchar env_get_char_memory (int index) return ( default_environment[index] ); } } -#endif uchar env_get_char (int index) { @@ -229,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 @@ -241,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 /* @@ -264,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