summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2010-09-17 13:10:33 +0200
committerWolfgang Denk <wd@denx.de>2010-09-19 19:29:51 +0200
commit620f1f6a64095ed558e68d37f1965d015cd49b02 (patch)
treef2704340052bdeabf49dcde31f3f99cfcdc0bd24 /arch/sparc
parent7e4a9e6dc819b2b3499659ca90e1e9c6d4ca3077 (diff)
downloadu-boot-imx-620f1f6a64095ed558e68d37f1965d015cd49b02.zip
u-boot-imx-620f1f6a64095ed558e68d37f1965d015cd49b02.tar.gz
u-boot-imx-620f1f6a64095ed558e68d37f1965d015cd49b02.tar.bz2
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/sparc')
-rw-r--r--arch/sparc/lib/board.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c
index 4f69709..d0890f6 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -252,33 +252,13 @@ void board_init_f(ulong bootflag)
post_run(NULL, POST_ROM | post_bootmode_get(0));
#endif
+#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++) {
- ulong addr;
- addr = (ulong) (cmdtp->cmd) + gd->reloc_off;
-#if DEBUG_COMMANDS
- printf("Command \"%s\": 0x%08lx => 0x%08lx\n",
- cmdtp->name, (ulong) (cmdtp->cmd), addr);
-#endif
- cmdtp->cmd =
- (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
-
- addr = (ulong) (cmdtp->name) + gd->reloc_off;
- cmdtp->name = (char *)addr;
-
- if (cmdtp->usage) {
- addr = (ulong) (cmdtp->usage) + gd->reloc_off;
- cmdtp->usage = (char *)addr;
- }
-#ifdef CONFIG_SYS_LONGHELP
- if (cmdtp->help) {
- addr = (ulong) (cmdtp->help) + gd->reloc_off;
- cmdtp->help = (char *)addr;
- }
-#endif
- }
+ fixup_cmdtable(&__u_boot_cmd_start,
+ (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
#if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
puts("AMBA:\n");