@@ -205,7 +205,7 @@ void get_board_serial(struct tag_serialnr *serialnr)
#ifdef CONFIG_ENV_IS_IN_MMC
__weak int board_mmc_get_env_dev(int devno)
{
- return CONFIG_SYS_MMC_ENV_DEV;
+ return devno;
}
int mmc_get_env_dev(void)
@@ -11,7 +11,7 @@
__weak int board_mmc_get_env_dev(int devno)
{
- return CONFIG_SYS_MMC_ENV_DEV;
+ return devno;
}
int mmc_get_env_dev(void)
@@ -492,7 +492,7 @@ int arch_cpu_init(void)
#ifdef CONFIG_ENV_IS_IN_MMC
__weak int board_mmc_get_env_dev(int devno)
{
- return CONFIG_SYS_MMC_ENV_DEV;
+ return devno;
}
static int mmc_get_boot_dev(void)
@@ -319,7 +319,7 @@ static char *get_reset_cause(char *ret)
#ifdef CONFIG_ENV_IS_IN_MMC
__weak int board_mmc_get_env_dev(int devno)
{
- return CONFIG_SYS_MMC_ENV_DEV;
+ return devno;
}
int mmc_get_env_dev(void)
@@ -52,13 +52,12 @@ int board_init(void)
return 0;
}
-int board_mmc_get_env_dev(int devno)
-{
- return devno;
-}
-
int board_late_init(void)
{
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
+#endif
+
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
env_set("board_name", "EVK");
env_set("board_rev", "iMX8MM");
@@ -88,11 +88,6 @@ int board_init(void)
return 0;
}
-int board_mmc_get_env_dev(int devno)
-{
- return devno;
-}
-
int board_late_init(void)
{
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
@@ -100,5 +95,9 @@ int board_late_init(void)
env_set("board_rev", "iMX8MQ");
#endif
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
+#endif
+
return 0;
}
@@ -116,11 +116,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
}
#endif
-int board_mmc_get_env_dev(int devno)
-{
- return devno;
-}
-
int board_late_init(void)
{
char *fdt_file;
@@ -141,5 +136,8 @@ int board_late_init(void)
env_set("fdt_file", "imx8qm-mek.dtb");
}
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
+#endif
return 0;
}
@@ -140,11 +140,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
}
#endif
-int board_mmc_get_env_dev(int devno)
-{
- return devno;
-}
-
int board_late_init(void)
{
char *fdt_file;
@@ -165,5 +160,9 @@ int board_late_init(void)
env_set("fdt_file", "imx8qxp-mek.dtb");
}
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
+#endif
+
return 0;
}
@@ -594,6 +594,10 @@ int board_late_init(void)
env_set("board_rev", "MX6DL");
#endif
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
+#endif
+
return 0;
}
@@ -572,6 +572,10 @@ int board_late_init(void)
env_set("board_rev", "MX6DL");
#endif
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
+#endif
+
return 0;
}
@@ -108,11 +108,6 @@ static void setup_iomux_uart(void)
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
}
-int board_mmc_get_env_dev(int devno)
-{
- return devno;
-}
-
#ifdef CONFIG_DM_PMIC_PFUZE100
int power_init_board(void)
{