From d470a6f60ad0d627c21a2769513d2017f9a0da76 Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Mon, 11 Oct 2010 05:51:39 -0700 Subject: env_mmc: Fix crashing bug encountered after enabling ARM relocation The crash was occuring in env_relocate because it was being called prior to mmc_initialize. This patch moves the MMC initialization earlier in the init process. This patch also cleans up the env_relocate_spec code in env_mmc.c Signed-off-by: Steve Sakoman Acked-by: Stefano Babic --- arch/arm/lib/board.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 22bd2c9b0e..108e6c40c4 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -770,6 +770,11 @@ void board_init_r (gd_t *id, ulong dest_addr) onenand_init(); #endif +#ifdef CONFIG_GENERIC_MMC + puts("MMC: "); + mmc_initialize(bd); +#endif + #ifdef CONFIG_HAS_DATAFLASH AT91F_DataflashInit(); dataflash_print_info(); @@ -835,11 +840,6 @@ void board_init_r (gd_t *id, ulong dest_addr) board_late_init (); #endif -#ifdef CONFIG_GENERIC_MMC - puts ("MMC: "); - mmc_initialize (gd->bd); -#endif - #ifdef CONFIG_BITBANGMII bb_miiphy_init(); #endif -- cgit