mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-30 16:40:44 +09:00
stm32mp1: board: add support of CONFIG_ENV_IS_IN_MMC
Add support of CONFIG_ENV_IS_IN_MMC in env_get_location, used for all mmc device (SD card and eMMC). The 2 configs CONFIG_ENV_IS_IN_MMC and CONFIG_ENV_IS_IN_EXT4 are incompatible. Add the weak function mmc_get_env_dev to select the mmc boot instance. Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
43fe9d2fda
commit
a9addcafd1
@ -787,6 +787,11 @@ enum env_location env_get_location(enum env_operation op, int prio)
|
|||||||
return ENVL_UNKNOWN;
|
return ENVL_UNKNOWN;
|
||||||
|
|
||||||
switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
|
switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
|
||||||
|
#ifdef CONFIG_ENV_IS_IN_MMC
|
||||||
|
case BOOT_FLASH_SD:
|
||||||
|
case BOOT_FLASH_EMMC:
|
||||||
|
return ENVL_MMC;
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_ENV_IS_IN_EXT4
|
#ifdef CONFIG_ENV_IS_IN_EXT4
|
||||||
case BOOT_FLASH_SD:
|
case BOOT_FLASH_SD:
|
||||||
case BOOT_FLASH_EMMC:
|
case BOOT_FLASH_EMMC:
|
||||||
@ -829,6 +834,15 @@ const char *env_ext4_get_dev_part(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_ENV_IS_IN_MMC)
|
||||||
|
int mmc_get_env_dev(void)
|
||||||
|
{
|
||||||
|
u32 bootmode = get_bootmode();
|
||||||
|
|
||||||
|
return (bootmode & TAMP_BOOT_INSTANCE_MASK) - 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_OF_BOARD_SETUP)
|
#if defined(CONFIG_OF_BOARD_SETUP)
|
||||||
int ft_board_setup(void *blob, struct bd_info *bd)
|
int ft_board_setup(void *blob, struct bd_info *bd)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user