summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/board.c15
-rw-r--r--arch/powerpc/lib/board.c17
2 files changed, 21 insertions, 11 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 54519b0..e17f182 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -347,6 +347,16 @@ void start_armboot (void)
dataflash_print_info();
#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.
+ */
+ puts ("MMC: ");
+ mmc_initialize (gd->bd);
+#endif
+
/* initialize environment */
env_relocate ();
@@ -419,11 +429,6 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
board_late_init ();
#endif
-#ifdef CONFIG_GENERIC_MMC
- puts ("MMC: ");
- mmc_initialize (gd->bd);
-#endif
-
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index 0e00d86..628d067 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -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: ");