From: Mingkai Hu Date: Fri, 11 Sep 2009 11:40:43 +0800 Subject: [U-Boot] [PATCH v1 1/3] Make mmc init come before env_relocate In-Reply-To: <1252640445-7890-1-git-send-email-Mingkai.hu@freescale.com> References: <1252640445-7890-1-git-send-email-Mingkai.hu@freescale.com> Message-ID: <1252640445-7890-2-git-send-email-Mingkai.hu@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- lib_ppc/board.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_ppc/board.c b/lib_ppc/board.c index e8509ee..d5329b7 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -824,6 +824,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 (); @@ -990,12 +996,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: "); -- 1.6.4