i.MX6UL: isiot: Switch the mmc env based on devno

Add board_mmc_get_env_dev

Switch the mmc env based on the mmc devno, instead of separately
defining a config item in include/configs using board_mmc_get_env_dev
- devno 0: sd/esd
- devno 1: mmc/emmc

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
This commit is contained in:
Jagan Teki 2017-02-24 15:45:20 +05:30 committed by Stefano Babic
parent 0dd259a1b1
commit e9685967bb

View file

@ -105,6 +105,12 @@ static void setup_gpmi_nand(void)
#endif /* CONFIG_NAND_MXS */
#ifdef CONFIG_ENV_IS_IN_MMC
int board_mmc_get_env_dev(int devno)
{
/* dev 0 for SD/eSD, dev 1 for MMC/eMMC */
return (devno == 0) ? 0 : 1;
}
static void mmc_late_init(void)
{
char cmd[32];