]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/lib/board.c
Save environment data to mmc.
[karo-tx-uboot.git] / arch / powerpc / lib / board.c
index 0e00d8619ebfb130dfd08d31f74d47f3f3a12c2f..628d067abf1b8ad66c5aabd241b9b21b3602b6d2 100644 (file)
@@ -783,6 +783,17 @@ void board_init_r (gd_t *id, ulong dest_addr)
        nand_init();            /* go init the NAND */
 #endif
 
+#ifdef CONFIG_GENERIC_MMC
+/*
+ * MMC initialization is called before relocating env.
+ * Thus It is required that operations like pin multiplexer
+ * be put in board_init.
+ */
+       WATCHDOG_RESET ();
+       puts ("MMC:  ");
+       mmc_initialize (bd);
+#endif
+
        /* relocate environment function pointers etc. */
        env_relocate ();
 
@@ -939,12 +950,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
        scsi_init ();
 #endif
 
-#ifdef CONFIG_GENERIC_MMC
-       WATCHDOG_RESET ();
-       puts ("MMC:  ");
-       mmc_initialize (bd);
-#endif
-
 #if defined(CONFIG_CMD_DOC)
        WATCHDOG_RESET ();
        puts ("DOC:   ");