summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipen Dudhat <dipen.dudhat@freescale.com>2009-10-30 10:19:54 +0530
committerScott Sweeny <scott.sweeny@timesys.com>2010-11-10 14:52:24 -0500
commit772cadb8b30286c5bf7656d986df6ed0c439550a (patch)
tree6f72ad9f75b55a8c5b633678a46d4064384ed274
parent986ed20b7fd6c003cb5afa5790d45c5c1c0f4aab (diff)
Make mmc_init before env_init
If the environment variables are saved on the MMC/SD card, env_relocat can't relocate env from MMC/SD card without mmc init. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
-rw-r--r--lib_ppc/board.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index dd22f99c67..2f4506b69b 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -2,6 +2,8 @@
* (C) Copyright 2000-2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
+ * Copyright 2009 Freescale Semiconductor, Inc.
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -784,6 +786,12 @@ void board_init_r (gd_t *id, ulong dest_addr)
nand_init(); /* go init the NAND */
#endif
+#ifdef CONFIG_GENERIC_MMC
+ WATCHDOG_RESET ();
+ puts ("MMC: ");
+ mmc_initialize (bd);
+#endif
+
/* relocate environment function pointers etc. */
env_relocate ();
@@ -940,12 +948,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: ");