]> git.sur5r.net Git - u-boot/commitdiff
ARM: fix relocation support for onenand device.
authorEnric Balletbo i Serra <eballetbo@iseebcn.com>
Tue, 19 Oct 2010 09:13:22 +0000 (11:13 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 23 Oct 2010 20:55:47 +0000 (22:55 +0200)
We also have to relocate the onenand command table manually, otherwise
onenand command don't work.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
arch/arm/lib/board.c
common/cmd_onenand.c

index ffe261bd4457e0eb9be0e74609c5efd5b09725ad..af9a414b88b6cf57a4ba2926a740ec577106cebc 100644 (file)
@@ -716,6 +716,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
 #if defined(CONFIG_CMD_I2C)
        i2c_reloc();
 #endif
+#if defined(CONFIG_CMD_ONENAND)
+       onenand_reloc();
+#endif
 #endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
 
 #ifdef CONFIG_LOGBUFFER
index 83d967bd18169bab10f4b004ea1fc7d509e1e4f9..fe84c3be96b94355758e3c651b5c897c5b7511ca 100644 (file)
@@ -525,6 +525,12 @@ static cmd_tbl_t cmd_onenand_sub[] = {
        U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""),
 };
 
+#ifndef CONFIG_RELOC_FIXUP_WORKS
+void onenand_reloc(void) {
+       fixup_cmdtable(cmd_onenand_sub, ARRAY_SIZE(cmd_onenand_sub));
+}
+#endif
+
 static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
        cmd_tbl_t *c;