diff options
author | Anish Trivedi <anish@freescale.com> | 2010-06-23 16:49:08 -0500 |
---|---|---|
committer | Anish Trivedi <anish@freescale.com> | 2010-06-24 09:47:41 -0500 |
commit | 429e9bb343c2c76dcf4aeaa3f4533f1dde09fb3a (patch) | |
tree | 6f8cb03ceb9c44f852d6edd6072d4cac04cca539 | |
parent | 3bd50a46e4453ca2492169e7add9cde0752442e2 (diff) | |
download | u-boot-imx-429e9bb343c2c76dcf4aeaa3f4533f1dde09fb3a.zip u-boot-imx-429e9bb343c2c76dcf4aeaa3f4533f1dde09fb3a.tar.gz u-boot-imx-429e9bb343c2c76dcf4aeaa3f4533f1dde09fb3a.tar.bz2 |
ENGR00124652 UBOOT: MX53 env fails to load when booting from 2nd slot
Added dynamic check for which sd slot used for boot
Signed-off-by: Anish Trivedi <anish@freescale.com>
-rw-r--r-- | board/freescale/mx53_evk/mx53_evk.c | 9 | ||||
-rw-r--r-- | include/configs/mx53_evk.h | 3 |
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 |