summaryrefslogtreecommitdiff
path: root/common/env_common.c
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2009-09-21 11:20:36 -0500
committerWolfgang Denk <wd@denx.de>2009-10-03 10:17:57 +0200
commit521af04d853361b49344b61892eb0618f9f713c5 (patch)
treeb5168e8f89074a797761a03c6bcf0c95ddfc5f12 /common/env_common.c
parent3cbcfa70b116df1bbdc90ba31c61adcaec058a8a (diff)
downloadu-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.zip
u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.tar.gz
u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.tar.bz2
Conditionally perform common relocation fixups
Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'common/env_common.c')
-rw-r--r--common/env_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/env_common.c b/common/env_common.c
index be64d13..439a4a9 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -224,8 +224,10 @@ 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);
+#endif
#ifdef CONFIG_AMIGAONEG3SE
enable_nvram();
@@ -236,7 +238,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
/*