diff options
author | Heiko Schocher <hs@denx.de> | 2010-09-17 13:10:33 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-09-19 19:29:51 +0200 |
commit | 620f1f6a64095ed558e68d37f1965d015cd49b02 (patch) | |
tree | f2704340052bdeabf49dcde31f3f99cfcdc0bd24 /arch/avr32/lib/board.c | |
parent | 7e4a9e6dc819b2b3499659ca90e1e9c6d4ca3077 (diff) |
relocation: fixup cmdtable
fixup_cmdtable() did all work for fixing up the cmdtable,
if CONFIG_RELOC_FIXUP_WORKS is not defined.
CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked
with Graeme Russ, and he will fix this soon.
Portions of this work were supported by funding from
the CE Linux Forum.
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/avr32/lib/board.c')
-rw-r--r-- | arch/avr32/lib/board.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index aa589bb4b0..e6b81cca73 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -273,30 +273,13 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) monitor_flash_len = _edata - _text; +#if !defined(CONFIG_RELOC_FIXUP_WORKS) /* * We have to relocate the command table manually */ - for (cmdtp = &__u_boot_cmd_start; - cmdtp != &__u_boot_cmd_end; cmdtp++) { - unsigned long addr; - - addr = (unsigned long)cmdtp->cmd + gd->reloc_off; - cmdtp->cmd = (typeof(cmdtp->cmd))addr; - - addr = (unsigned long)cmdtp->name + gd->reloc_off; - cmdtp->name = (typeof(cmdtp->name))addr; - - if (cmdtp->usage) { - addr = (unsigned long)cmdtp->usage + gd->reloc_off; - cmdtp->usage = (typeof(cmdtp->usage))addr; - } -#ifdef CONFIG_SYS_LONGHELP - if (cmdtp->help) { - addr = (unsigned long)cmdtp->help + gd->reloc_off; - cmdtp->help = (typeof(cmdtp->help))addr; - } -#endif - } + fixup_cmdtable(&__u_boot_cmd_start, + (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start)); +#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */ /* there are some other pointer constants we must deal with */ #ifndef CONFIG_ENV_IS_NOWHERE |