Commit 1eae8c24 authored by Peng Fan's avatar Peng Fan Committed by Jason Liu
Browse files

MLK-15323-3 imx8m: implement mmc_get_env_dev



Implement mmc_get_env_dev
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 6e6b24ad
......@@ -225,6 +225,27 @@ enum boot_device get_boot_device(void)
return boot_dev;
}
#ifdef CONFIG_ENV_IS_IN_MMC
__weak int board_mmc_get_env_dev(int devno)
{
return CONFIG_SYS_MMC_ENV_DEV;
}
int mmc_get_env_dev(void)
{
struct bootrom_sw_info **p =
(struct bootrom_sw_info **)ROM_SW_INFO_ADDR;
int devno = (*p)->boot_dev_instance;
u8 boot_type = (*p)->boot_dev_type;
/* If not boot from sd/mmc, use default value */
if ((boot_type != BOOT_TYPE_SD) && (boot_type != BOOT_TYPE_MMC))
return CONFIG_SYS_MMC_ENV_DEV;
return board_mmc_get_env_dev(devno);
}
#endif
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment