summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2010-10-11 05:51:39 -0700
committerWolfgang Denk <wd@denx.de>2010-10-13 21:52:13 +0200
commitd470a6f60ad0d627c21a2769513d2017f9a0da76 (patch)
treed004fc1d1ada88f8341e9069b7ef7fdff40c14ac /arch
parente1b4c57096b87b4ada56df4154d9acee6a59141f (diff)
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 <steve.sakoman@linaro.org> Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/board.c10
1 files changed, 5 insertions, 5 deletions
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