summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/freescale/mx53_evk/mx53_evk.c9
-rw-r--r--include/configs/mx53_evk.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/mx53_evk/mx53_evk.c b/board/freescale/mx53_evk/mx53_evk.c
index f9731bf..8cfd2da 100644
--- a/board/freescale/mx53_evk/mx53_evk.c
+++ b/board/freescale/mx53_evk/mx53_evk.c
@@ -600,6 +600,15 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = {
{MMC_SDHC3_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 & 0x00300000) ? 1 : 0;
+}
+#endif
+
+
int esdhc_gpio_init(bd_t *bis)
{
s32 status = 0;
diff --git a/include/configs/mx53_evk.h b/include/configs/mx53_evk.h
index e139840..730f104 100644
--- a/include/configs/mx53_evk.h
+++ b/include/configs/mx53_evk.h
@@ -199,6 +199,9 @@
#define CONFIG_CMD_FAT 1
#define CONFIG_CMD_EXT2 1
+ /* detect whether ESDHC1 or ESDHC3 is boot device */
+ #define CONFIG_DYNAMIC_MMC_DEVNO
+
#define CONFIG_BOOT_PARTITION_ACCESS
#endif