summaryrefslogtreecommitdiff
path: root/board/freescale/mx51_bbg
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2010-06-25 15:25:14 +0800
committerTerry Lv <r65388@freescale.com>2010-07-08 14:35:36 +0800
commitd6141b1640edd06e59e431baf1ab87b0894f22f3 (patch)
treeb01040ce51f8e8634c973ef327ce56cec793a960 /board/freescale/mx51_bbg
parente362247d0a17c4702835b0889e1149fa270976f2 (diff)
downloadu-boot-imx-d6141b1640edd06e59e431baf1ab87b0894f22f3.zip
u-boot-imx-d6141b1640edd06e59e431baf1ab87b0894f22f3.tar.gz
u-boot-imx-d6141b1640edd06e59e431baf1ab87b0894f22f3.tar.bz2
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 <r65388@freescale.com>
Diffstat (limited to 'board/freescale/mx51_bbg')
-rw-r--r--board/freescale/mx51_bbg/mx51_bbg.c8
1 files changed, 8 insertions, 0 deletions
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;