Commit cdb1d4f97e7e3599549852b89f2fd56cbf1e5322

Authored by Enric Balletbo i Serra
Committed by Wolfgang Denk
1 parent 116ef54d68

ARM: fix relocation support for onenand device.

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>

Showing 2 changed files with 9 additions and 0 deletions Side-by-side Diff

arch/arm/lib/board.c
... ... @@ -716,6 +716,9 @@
716 716 #if defined(CONFIG_CMD_I2C)
717 717 i2c_reloc();
718 718 #endif
  719 +#if defined(CONFIG_CMD_ONENAND)
  720 + onenand_reloc();
  721 +#endif
719 722 #endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
720 723  
721 724 #ifdef CONFIG_LOGBUFFER
common/cmd_onenand.c
... ... @@ -525,6 +525,12 @@
525 525 U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""),
526 526 };
527 527  
  528 +#ifndef CONFIG_RELOC_FIXUP_WORKS
  529 +void onenand_reloc(void) {
  530 + fixup_cmdtable(cmd_onenand_sub, ARRAY_SIZE(cmd_onenand_sub));
  531 +}
  532 +#endif
  533 +
528 534 static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
529 535 {
530 536 cmd_tbl_t *c;