From d6141b1640edd06e59e431baf1ab87b0894f22f3 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Fri, 25 Jun 2010 15:25:14 +0800 Subject: ENGR00124627: Dynamic SD slot support for env data. MMC init failed when boot with upper SD slot while succesful with lower slot. This patch will fix it. Signed-off-by: Terry Lv --- board/freescale/mx51_bbg/mx51_bbg.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board/freescale/mx51_bbg') diff --git a/board/freescale/mx51_bbg/mx51_bbg.c b/board/freescale/mx51_bbg/mx51_bbg.c index f615589..66bb43d 100644 --- a/board/freescale/mx51_bbg/mx51_bbg.c +++ b/board/freescale/mx51_bbg/mx51_bbg.c @@ -687,6 +687,14 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = { {MMC_SDHC2_BASE_ADDR, 1, 1}, }; +#ifdef CONFIG_DYNAMIC_MMC_DEVNO +int get_mmc_env_devno() +{ + uint soc_sbmr = readl(SRC_BASE_ADDR + 0x4); + return (soc_sbmr & 0x00180000) ? 1 : 0; +} +#endif + int esdhc_gpio_init(bd_t *bis) { s32 status = 0; -- cgit v1.1