Blackfin: init NAND before relocating env
authorMike Frysinger <vapier@gentoo.org>
Mon, 6 Oct 2008 07:55:25 +0000 (03:55 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 23 Oct 2008 09:03:50 +0000 (05:03 -0400)
If booting out of NAND, we need to make sure we initialize it properly
before attempting to relocate the environment.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
lib_blackfin/board.c

index 2679b438fea50df23a1b6d67ea5942f692253fed..e184fd2f2bd401e0d0c84912324f4bdb5172e226 100644 (file)
@@ -380,6 +380,11 @@ void board_init_r(gd_t * id, ulong dest_addr)
        spi_init_r();
 #endif
 
+#ifdef CONFIG_CMD_NAND
+       puts("NAND:  ");
+       nand_init();            /* go init the NAND */
+#endif
+
        /* relocate environment function pointers etc. */
        env_relocate();
 
@@ -427,11 +432,6 @@ void board_init_r(gd_t * id, ulong dest_addr)
                copy_filename(BootFile, s, sizeof(BootFile));
 #endif
 
-#ifdef CONFIG_CMD_NAND
-       puts("NAND:  ");
-       nand_init();            /* go init the NAND */
-#endif
-
 #if defined(CONFIG_MISC_INIT_R)
        /* miscellaneous platform dependent initialisations */
        misc_init_r();