aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/mvebu/bubt.c4
-rw-r--r--configs/am335x_boneblack_vboot_defconfig1
-rw-r--r--configs/am335x_shc_defconfig1
-rw-r--r--configs/am335x_shc_ict_defconfig1
-rw-r--r--configs/am335x_sl50_defconfig2
-rw-r--r--configs/am57xx_evm_defconfig1
-rw-r--r--configs/am57xx_hs_evm_defconfig1
-rw-r--r--configs/am57xx_hs_evm_usb_defconfig1
-rw-r--r--configs/am65x_evm_a53_defconfig1
-rw-r--r--configs/am65x_hs_evm_a53_defconfig1
-rw-r--r--configs/apalis-imx8qm_defconfig1
-rw-r--r--configs/apalis-tk1_defconfig1
-rw-r--r--configs/apalis_imx6_defconfig1
-rw-r--r--configs/apalis_t30_defconfig1
-rw-r--r--configs/bcm11130_defconfig1
-rw-r--r--configs/beaver_defconfig1
-rw-r--r--configs/brppt1_mmc_defconfig2
-rw-r--r--configs/brxre1_defconfig2
-rw-r--r--configs/cardhu_defconfig1
-rw-r--r--configs/cei-tk1-som_defconfig1
-rw-r--r--configs/colibri-imx8qxp_defconfig1
-rw-r--r--configs/colibri_imx6_defconfig1
-rw-r--r--configs/colibri_imx7_emmc_defconfig1
-rw-r--r--configs/colibri_t30_defconfig1
-rw-r--r--configs/dalmore_defconfig1
-rw-r--r--configs/deneb_defconfig1
-rw-r--r--configs/dra7xx_evm_defconfig1
-rw-r--r--configs/dra7xx_hs_evm_defconfig1
-rw-r--r--configs/dra7xx_hs_evm_usb_defconfig1
-rw-r--r--configs/dragonboard410c_defconfig1
-rw-r--r--configs/e2220-1170_defconfig1
-rw-r--r--configs/evb-rk3328_defconfig1
-rw-r--r--configs/ficus-rk3399_defconfig1
-rw-r--r--configs/giedi_defconfig1
-rw-r--r--configs/gwventana_emmc_defconfig1
-rw-r--r--configs/gwventana_gw5904_defconfig1
-rw-r--r--configs/hikey_defconfig1
-rw-r--r--configs/imx6dl_mamoj_defconfig1
-rw-r--r--configs/imx8mm_beacon_defconfig1
-rw-r--r--configs/imx8mm_evk_defconfig1
-rw-r--r--configs/imx8mp_evk_defconfig1
-rw-r--r--configs/imx8mq_evk_defconfig1
-rw-r--r--configs/imx8mq_phanbell_defconfig1
-rw-r--r--configs/imx8qm_mek_defconfig1
-rw-r--r--configs/imx8qm_rom7720_a1_4G_defconfig1
-rw-r--r--configs/imx8qxp_mek_defconfig1
-rw-r--r--configs/j721e_evm_a72_defconfig1
-rw-r--r--configs/j721e_hs_evm_a72_defconfig1
-rw-r--r--configs/j721e_hs_evm_r5_defconfig1
-rw-r--r--configs/jetson-tk1_defconfig1
-rw-r--r--configs/kp_imx6q_tpc_defconfig1
-rw-r--r--configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1046afrwy_tfa_defconfig1
-rw-r--r--configs/mx6dlarm2_defconfig1
-rw-r--r--configs/mx6dlarm2_lpddr2_defconfig1
-rw-r--r--configs/mx6qarm2_defconfig1
-rw-r--r--configs/mx6qarm2_lpddr2_defconfig1
-rw-r--r--configs/mx6sabresd_defconfig1
-rw-r--r--configs/mx6slevk_defconfig1
-rw-r--r--configs/mx6slevk_spl_defconfig1
-rw-r--r--configs/mx6sxsabresd_defconfig1
-rw-r--r--configs/mx6ul_14x14_evk_defconfig1
-rw-r--r--configs/mx6ul_9x9_evk_defconfig1
-rw-r--r--configs/mx6ull_14x14_evk_defconfig1
-rw-r--r--configs/mx6ull_14x14_evk_plugin_defconfig1
-rw-r--r--configs/mx6ulz_14x14_evk_defconfig1
-rw-r--r--configs/nyan-big_defconfig1
-rw-r--r--configs/omap4_sdp4430_defconfig1
-rw-r--r--configs/omap5_uevm_defconfig1
-rw-r--r--configs/opos6uldev_defconfig1
-rw-r--r--configs/p2371-0000_defconfig1
-rw-r--r--configs/p2371-2180_defconfig1
-rw-r--r--configs/p2571_defconfig1
-rw-r--r--configs/p2771-0000-000_defconfig1
-rw-r--r--configs/p2771-0000-500_defconfig1
-rw-r--r--configs/paz00_defconfig1
-rw-r--r--configs/phycore-rk3288_defconfig1
-rw-r--r--configs/pico-imx8mq_defconfig1
-rw-r--r--configs/puma-rk3399_defconfig1
-rw-r--r--configs/r8a774a1_beacon_defconfig2
-rw-r--r--configs/r8a77990_ebisu_defconfig2
-rw-r--r--configs/r8a77995_draak_defconfig1
-rw-r--r--configs/rcar3_salvator-x_defconfig2
-rw-r--r--configs/rcar3_ulcb_defconfig2
-rw-r--r--configs/riotboard_defconfig1
-rw-r--r--configs/riotboard_spl_defconfig1
-rw-r--r--configs/roc-cc-rk3328_defconfig1
-rw-r--r--configs/rock-pi-e-rk3328_defconfig1
-rw-r--r--configs/rock64-rk3328_defconfig1
-rw-r--r--configs/rock960-rk3399_defconfig1
-rw-r--r--configs/s5p4418_nanopi2_defconfig2
-rw-r--r--configs/seaboard_defconfig1
-rw-r--r--configs/sei510_defconfig2
-rw-r--r--configs/sei610_defconfig2
-rw-r--r--configs/somlabs_visionsom_6ull_defconfig1
-rw-r--r--configs/tbs2910_defconfig2
-rw-r--r--configs/tec-ng_defconfig1
-rw-r--r--configs/tinker-rk3288_defconfig1
-rw-r--r--configs/tinker-s-rk3288_defconfig1
-rw-r--r--configs/venice2_defconfig1
-rw-r--r--configs/ventana_defconfig1
-rw-r--r--configs/verdin-imx8mm_defconfig1
-rw-r--r--configs/vining_2000_defconfig1
-rw-r--r--configs/vyasa-rk3288_defconfig1
-rw-r--r--configs/xpress_defconfig1
-rw-r--r--configs/xpress_spl_defconfig1
-rw-r--r--configs/zc5202_defconfig2
-rw-r--r--configs/zc5601_defconfig2
-rw-r--r--env/Kconfig19
-rw-r--r--env/mmc.c4
-rw-r--r--include/configs/P1010RDB.h1
-rw-r--r--include/configs/P2041RDB.h1
-rw-r--r--include/configs/T102xRDB.h5
-rw-r--r--include/configs/T104xRDB.h2
-rw-r--r--include/configs/T208xQDS.h5
-rw-r--r--include/configs/T208xRDB.h5
-rw-r--r--include/configs/T4240RDB.h5
-rw-r--r--include/configs/UCP1020.h4
-rw-r--r--include/configs/am335x_evm.h2
-rw-r--r--include/configs/am335x_shc.h17
-rw-r--r--include/configs/am335x_sl50.h5
-rw-r--r--include/configs/am57xx_evm.h4
-rw-r--r--include/configs/am65x_evm.h6
-rw-r--r--include/configs/apalis-imx8.h4
-rw-r--r--include/configs/apalis-tk1.h4
-rw-r--r--include/configs/apalis_imx6.h8
-rw-r--r--include/configs/apalis_t30.h4
-rw-r--r--include/configs/apx4devkit.h7
-rw-r--r--include/configs/at91-sama5_common.h5
-rw-r--r--include/configs/at91sam9260ek.h1
-rw-r--r--include/configs/at91sam9n12ek.h9
-rw-r--r--include/configs/bcm23550_w1d.h1
-rw-r--r--include/configs/bcm28155_ap.h1
-rw-r--r--include/configs/bcm7260.h2
-rw-r--r--include/configs/bcm_ns3.h4
-rw-r--r--include/configs/beacon-rzg2m.h5
-rw-r--r--include/configs/beaver.h4
-rw-r--r--include/configs/brppt1.h12
-rw-r--r--include/configs/brxre1.h2
-rw-r--r--include/configs/capricorn-common.h4
-rw-r--r--include/configs/cardhu.h4
-rw-r--r--include/configs/cei-tk1-som.h4
-rw-r--r--include/configs/cgtqmx6eval.h6
-rw-r--r--include/configs/chiliboard.h2
-rw-r--r--include/configs/ci20.h3
-rw-r--r--include/configs/clearfog.h1
-rw-r--r--include/configs/colibri-imx8x.h2
-rw-r--r--include/configs/colibri_imx6.h8
-rw-r--r--include/configs/colibri_imx7.h8
-rw-r--r--include/configs/colibri_t30.h4
-rw-r--r--include/configs/controlcenterd.h1
-rw-r--r--include/configs/corenet_ds.h1
-rw-r--r--include/configs/cyrus.h1
-rw-r--r--include/configs/dalmore.h2
-rw-r--r--include/configs/dart_6ul.h2
-rw-r--r--include/configs/dh_imx6.h1
-rw-r--r--include/configs/dra7xx_evm.h1
-rw-r--r--include/configs/draak.h2
-rw-r--r--include/configs/dragonboard410c.h3
-rw-r--r--include/configs/e2220-1170.h2
-rw-r--r--include/configs/ebisu.h2
-rw-r--r--include/configs/edison.h2
-rw-r--r--include/configs/el6x_common.h5
-rw-r--r--include/configs/elgin_rv1108.h2
-rw-r--r--include/configs/embestmx6boards.h1
-rw-r--r--include/configs/evb_px30.h2
-rw-r--r--include/configs/evb_px5.h2
-rw-r--r--include/configs/evb_rk3128.h2
-rw-r--r--include/configs/evb_rk3229.h2
-rw-r--r--include/configs/evb_rk3288.h2
-rw-r--r--include/configs/evb_rk3308.h1
-rw-r--r--include/configs/evb_rk3328.h2
-rw-r--r--include/configs/evb_rk3399.h4
-rw-r--r--include/configs/exynos5-common.h2
-rw-r--r--include/configs/firefly-rk3288.h2
-rw-r--r--include/configs/firefly_rk3308.h1
-rw-r--r--include/configs/gru.h2
-rw-r--r--include/configs/gw_ventana.h4
-rw-r--r--include/configs/helios4.h1
-rw-r--r--include/configs/hikey.h2
-rw-r--r--include/configs/imx6-engicam.h3
-rw-r--r--include/configs/imx6dl-mamoj.h1
-rw-r--r--include/configs/imx8mm_beacon.h2
-rw-r--r--include/configs/imx8mm_evk.h1
-rw-r--r--include/configs/imx8mn_evk.h1
-rw-r--r--include/configs/imx8mp_evk.h1
-rw-r--r--include/configs/imx8mq_evk.h1
-rw-r--r--include/configs/imx8mq_phanbell.h1
-rw-r--r--include/configs/imx8qm_mek.h2
-rw-r--r--include/configs/imx8qm_rom7720.h3
-rw-r--r--include/configs/imx8qxp_mek.h2
-rw-r--r--include/configs/imxrt1020-evk.h2
-rw-r--r--include/configs/imxrt1050-evk.h2
-rw-r--r--include/configs/j721e_evm.h4
-rw-r--r--include/configs/jetson-tk1.h2
-rw-r--r--include/configs/kp_imx53.h1
-rw-r--r--include/configs/kp_imx6q_tpc.h2
-rw-r--r--include/configs/kylin_rk3036.h2
-rw-r--r--include/configs/lion_rk3368.h1
-rw-r--r--include/configs/liteboard.h2
-rw-r--r--include/configs/ls1021aiot.h8
-rw-r--r--include/configs/ls1021aqds.h4
-rw-r--r--include/configs/ls1021atsn.h4
-rw-r--r--include/configs/ls1021atwr.h4
-rw-r--r--include/configs/ls1028a_common.h1
-rw-r--r--include/configs/ls1043aqds.h9
-rw-r--r--include/configs/ls1043ardb.h9
-rw-r--r--include/configs/ls1046afrwy.h2
-rw-r--r--include/configs/ls1046aqds.h1
-rw-r--r--include/configs/ls1046ardb.h1
-rw-r--r--include/configs/ls1088aqds.h7
-rw-r--r--include/configs/ls1088ardb.h2
-rw-r--r--include/configs/ls2080aqds.h6
-rw-r--r--include/configs/ls2080ardb.h3
-rw-r--r--include/configs/lx2160a_common.h2
-rw-r--r--include/configs/meerkat96.h2
-rw-r--r--include/configs/meson64_android.h3
-rw-r--r--include/configs/miqi_rk3288.h2
-rw-r--r--include/configs/mt7622.h2
-rw-r--r--include/configs/mt7623.h2
-rw-r--r--include/configs/mt8512.h6
-rw-r--r--include/configs/mt8518.h6
-rw-r--r--include/configs/mvebu_armada-8k.h1
-rw-r--r--include/configs/mx23_olinuxino.h7
-rw-r--r--include/configs/mx23evk.h3
-rw-r--r--include/configs/mx25pdk.h1
-rw-r--r--include/configs/mx28evk.h3
-rw-r--r--include/configs/mx51evk.h1
-rw-r--r--include/configs/mx53ard.h1
-rw-r--r--include/configs/mx53cx9020.h1
-rw-r--r--include/configs/mx53evk.h1
-rw-r--r--include/configs/mx53loco.h1
-rw-r--r--include/configs/mx53ppd.h1
-rw-r--r--include/configs/mx53smd.h1
-rw-r--r--include/configs/mx6cuboxi.h1
-rw-r--r--include/configs/mx6qarm2.h1
-rw-r--r--include/configs/mx6sabreauto.h3
-rw-r--r--include/configs/mx6sabresd.h3
-rw-r--r--include/configs/mx6slevk.h3
-rw-r--r--include/configs/mx6sllevk.h2
-rw-r--r--include/configs/mx6sxsabreauto.h3
-rw-r--r--include/configs/mx6sxsabresd.h3
-rw-r--r--include/configs/mx6ul_14x14_evk.h2
-rw-r--r--include/configs/mx6ullevk.h2
-rw-r--r--include/configs/mx7dsabresd.h3
-rw-r--r--include/configs/mx7ulp_com.h1
-rw-r--r--include/configs/mx7ulp_evk.h2
-rw-r--r--include/configs/nitrogen6x.h4
-rw-r--r--include/configs/novena.h3
-rw-r--r--include/configs/nyan-big.h2
-rw-r--r--include/configs/odroid.h2
-rw-r--r--include/configs/odroid_go2.h2
-rw-r--r--include/configs/omap4_sdp4430.h1
-rw-r--r--include/configs/omap5_uevm.h1
-rw-r--r--include/configs/opos6uldev.h2
-rw-r--r--include/configs/origen.h1
-rw-r--r--include/configs/p1_p2_rdb_pc.h1
-rw-r--r--include/configs/p2371-0000.h2
-rw-r--r--include/configs/p2371-2180.h2
-rw-r--r--include/configs/p2571.h2
-rw-r--r--include/configs/p2771-0000.h2
-rw-r--r--include/configs/paz00.h2
-rw-r--r--include/configs/pcl063_ull.h2
-rw-r--r--include/configs/pcm052.h3
-rw-r--r--include/configs/phycore_am335x_r2.h1
-rw-r--r--include/configs/phycore_rk3288.h2
-rw-r--r--include/configs/pico-imx6.h1
-rw-r--r--include/configs/pico-imx6ul.h4
-rw-r--r--include/configs/pico-imx7d.h3
-rw-r--r--include/configs/pico-imx8mq.h1
-rw-r--r--include/configs/platinum.h1
-rw-r--r--include/configs/poplar.h3
-rw-r--r--include/configs/popmetal_rk3288.h2
-rw-r--r--include/configs/puma_rk3399.h4
-rw-r--r--include/configs/rock.h2
-rw-r--r--include/configs/rock2.h2
-rw-r--r--include/configs/rock960_rk3399.h2
-rw-r--r--include/configs/s32v234evb.h2
-rw-r--r--include/configs/s5p4418_nanopi2.h25
-rw-r--r--include/configs/s5p_goni.h1
-rw-r--r--include/configs/s5pc210_universal.h2
-rw-r--r--include/configs/salvator-x.h2
-rw-r--r--include/configs/sc_sps_1.h3
-rw-r--r--include/configs/seaboard.h2
-rw-r--r--include/configs/secomx6quq7.h1
-rw-r--r--include/configs/sheep_rk3368.h1
-rw-r--r--include/configs/sksimx6.h1
-rw-r--r--include/configs/smdkv310.h1
-rw-r--r--include/configs/socfpga_common.h3
-rw-r--r--include/configs/socfpga_soc64_common.h1
-rw-r--r--include/configs/somlabs_visionsom_6ull.h2
-rw-r--r--include/configs/sunxi-common.h2
-rw-r--r--include/configs/tbs2910.h4
-rw-r--r--include/configs/tec-ng.h2
-rw-r--r--include/configs/tinker_rk3288.h2
-rw-r--r--include/configs/titanium.h1
-rw-r--r--include/configs/tqma6.h2
-rw-r--r--include/configs/trats.h2
-rw-r--r--include/configs/trats2.h2
-rw-r--r--include/configs/ts4600.h3
-rw-r--r--include/configs/ts4800.h2
-rw-r--r--include/configs/udoo.h2
-rw-r--r--include/configs/udoo_neo.h1
-rw-r--r--include/configs/ulcb.h2
-rw-r--r--include/configs/uniphier.h3
-rw-r--r--include/configs/usbarmory.h1
-rw-r--r--include/configs/venice2.h2
-rw-r--r--include/configs/ventana.h2
-rw-r--r--include/configs/verdin-imx8mm.h2
-rw-r--r--include/configs/vf610twr.h4
-rw-r--r--include/configs/vining_2000.h2
-rw-r--r--include/configs/vyasa-rk3288.h2
-rw-r--r--include/configs/wandboard.h2
-rw-r--r--include/configs/warp.h2
-rw-r--r--include/configs/warp7.h3
-rw-r--r--include/configs/xpress.h2
-rw-r--r--scripts/config_whitelist.txt2
317 files changed, 139 insertions, 586 deletions
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index 0d52be8dbf7..4c58fd3c2e2 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -27,10 +27,6 @@
#include <u-boot/sha1.h>
#include <u-boot/sha256.h>
-#ifndef CONFIG_SYS_MMC_ENV_DEV
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#if defined(CONFIG_ARMADA_8K)
#define MAIN_HDR_MAGIC 0xB105B002
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index e78bde30e13..27dab8b21b1 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -36,6 +36,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
# CONFIG_SPL_BLK is not set
diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig
index 038e0325a69..d82bca757d6 100644
--- a/configs/am335x_shc_defconfig
+++ b/configs/am335x_shc_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM_MMC=y
diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig
index a4b8b115007..ad1ff7e9a3f 100644
--- a/configs/am335x_shc_ict_defconfig
+++ b/configs/am335x_shc_ict_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM_MMC=y
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index 66541c07bdb..1f0b05b565e 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -52,6 +52,8 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_BOOTCOUNT_LIMIT=y
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index 72111466440..92918c39225 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM=y
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index cfec32e81b1..6866440509d 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -56,6 +56,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM=y
diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig
index 64935b7749b..ff3d083a310 100644
--- a/configs/am57xx_hs_evm_usb_defconfig
+++ b/configs/am57xx_hs_evm_usb_defconfig
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM=y
diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index 86bd940e2e8..05a7de87a1b 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -68,6 +68,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SPL_DM=y
diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig
index 459fa6de0aa..9403f379ece 100644
--- a/configs/am65x_hs_evm_a53_defconfig
+++ b/configs/am65x_hs_evm_a53_defconfig
@@ -71,6 +71,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SPL_DM=y
diff --git a/configs/apalis-imx8qm_defconfig b/configs/apalis-imx8qm_defconfig
index 9b9736e9b68..be70c7c2340 100644
--- a/configs/apalis-imx8qm_defconfig
+++ b/configs/apalis-imx8qm_defconfig
@@ -34,6 +34,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_CLK_IMX8=y
diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index 13885602d90..e21a8c24777 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_SPL_DM=y
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 43f83e7c835..cf6051c4ffa 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -61,6 +61,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=4096
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index bb3138f3555..1e130507402 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -30,6 +30,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_SPL_DM=y
diff --git a/configs/bcm11130_defconfig b/configs/bcm11130_defconfig
index 8510cc272f9..f04fcf59d5f 100644
--- a/configs/bcm11130_defconfig
+++ b/configs/bcm11130_defconfig
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0xae000000
CONFIG_ENV_SIZE=0x1000
CONFIG_ENV_OFFSET=0x2340000
CONFIG_NR_DRAM_BANKS=1
-CONFIG_SYS_EXTRA_OPTIONS="SYS_MMC_ENV_DEV=0"
CONFIG_MISC_INIT_R=y
CONFIG_VERSION_VARIABLE=y
# CONFIG_DISPLAY_CPUINFO is not set
diff --git a/configs/beaver_defconfig b/configs/beaver_defconfig
index 5f5bf1e6c27..ca3bb056851 100644
--- a/configs/beaver_defconfig
+++ b/configs/beaver_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index 40eeaa7defd..fd9d18879eb 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -71,6 +71,8 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_BOOTP_SEND_HOSTNAME=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SPL_DM=y
diff --git a/configs/brxre1_defconfig b/configs/brxre1_defconfig
index d7b1765f2a1..29156f0b9ff 100644
--- a/configs/brxre1_defconfig
+++ b/configs/brxre1_defconfig
@@ -70,6 +70,8 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_BOOTP_SEND_HOSTNAME=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_NETCONSOLE=y
CONFIG_DM=y
diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig
index dfd75ed8b73..99f4d6d4f89 100644
--- a/configs/cardhu_defconfig
+++ b/configs/cardhu_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT4_WRITE=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_SYS_I2C_TEGRA=y
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/cei-tk1-som_defconfig b/configs/cei-tk1-som_defconfig
index 436d0264517..a508bbdc2c4 100644
--- a/configs/cei-tk1-som_defconfig
+++ b/configs/cei-tk1-som_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/colibri-imx8qxp_defconfig b/configs/colibri-imx8qxp_defconfig
index e729628e277..bad38b1afce 100644
--- a/configs/colibri-imx8qxp_defconfig
+++ b/configs/colibri-imx8qxp_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_CLK_IMX8=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index 800663ed91c..ac009159058 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -61,6 +61,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=16352
diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig
index 8355fef4192..7c3eab82b12 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -46,6 +46,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=16352
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index b516d5f509e..14028c02c38 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_SPL_DM=y
diff --git a/configs/dalmore_defconfig b/configs/dalmore_defconfig
index c6c1981c670..aac7186bb05 100644
--- a/configs/dalmore_defconfig
+++ b/configs/dalmore_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/deneb_defconfig b/configs/deneb_defconfig
index bc4ad785bf5..2fd5a2e2e58 100644
--- a/configs/deneb_defconfig
+++ b/configs/deneb_defconfig
@@ -61,6 +61,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 86eb6f85ddf..56d3da0e023 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -59,6 +59,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM=y
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index 6079920ff9d..772238b5aed 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM=y
diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig
index e6b9682792c..624c50d2c61 100644
--- a/configs/dra7xx_hs_evm_usb_defconfig
+++ b/configs/dra7xx_hs_evm_usb_defconfig
@@ -58,6 +58,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM=y
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index 3121bc3a2fd..987b0a7c9f4 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_TIMER=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_CLK=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x91000000
diff --git a/configs/e2220-1170_defconfig b/configs/e2220-1170_defconfig
index d071e6b227d..883e43763be 100644
--- a/configs/e2220-1170_defconfig
+++ b/configs/e2220-1170_defconfig
@@ -24,6 +24,7 @@ CONFIG_BOOTP_PREFER_SERVERIP=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index c0ee67ee846..edd6ee1b5e7 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -41,6 +41,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent
CONFIG_TPL_OF_PLATDATA=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TPL_DM=y
CONFIG_REGMAP=y
diff --git a/configs/ficus-rk3399_defconfig b/configs/ficus-rk3399_defconfig
index df1b212976a..c20b564d434 100644
--- a/configs/ficus-rk3399_defconfig
+++ b/configs/ficus-rk3399_defconfig
@@ -24,6 +24,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/configs/giedi_defconfig b/configs/giedi_defconfig
index ce7449ac99b..5696497efd9 100644
--- a/configs/giedi_defconfig
+++ b/configs/giedi_defconfig
@@ -61,6 +61,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index df7f34ae971..5d83affceee 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -66,6 +66,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_SUPPORT_EMMC_RPMB=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 536b9554fd7..f319f2a0b84 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -66,6 +66,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_SUPPORT_EMMC_RPMB=y
diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig
index 8b115ea70ad..a4304b29dac 100644
--- a/configs/hikey_defconfig
+++ b/configs/hikey_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_USB=y
CONFIG_CMD_CACHE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_K3=y
diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
index 52c26aa59e4..31a4e57f510 100644
--- a/configs/imx6dl_mamoj_defconfig
+++ b/configs/imx6dl_mamoj_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_DFU_MMC=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x12000000
diff --git a/configs/imx8mm_beacon_defconfig b/configs/imx8mm_beacon_defconfig
index 9e140d14a58..c5d331f617a 100644
--- a/configs/imx8mm_beacon_defconfig
+++ b/configs/imx8mm_beacon_defconfig
@@ -56,6 +56,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
index 7919d0aeff8..91d3bc3ac94 100644
--- a/configs/imx8mm_evk_defconfig
+++ b/configs/imx8mm_evk_defconfig
@@ -54,6 +54,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SPL_DM=y
CONFIG_SPL_CLK_COMPOSITE_CCF=y
diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig
index 2a6bfdc62f6..4ed02846f59 100644
--- a/configs/imx8mp_evk_defconfig
+++ b/configs/imx8mp_evk_defconfig
@@ -56,6 +56,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SPL_DM=y
CONFIG_CLK_COMPOSITE_CCF=y
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 1b22456a3fa..c755e74494c 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -40,6 +40,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
index 2744140d5c3..5fa89e9963f 100644
--- a/configs/imx8mq_phanbell_defconfig
+++ b/configs/imx8mq_phanbell_defconfig
@@ -41,6 +41,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig
index 106f8437cef..601ac0f6560 100644
--- a/configs/imx8qm_mek_defconfig
+++ b/configs/imx8qm_mek_defconfig
@@ -49,6 +49,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SPL_DM=y
CONFIG_SPL_CLK=y
CONFIG_CLK_IMX8=y
diff --git a/configs/imx8qm_rom7720_a1_4G_defconfig b/configs/imx8qm_rom7720_a1_4G_defconfig
index 33dc4b00f8d..b2b85d7150e 100644
--- a/configs/imx8qm_rom7720_a1_4G_defconfig
+++ b/configs/imx8qm_rom7720_a1_4G_defconfig
@@ -45,6 +45,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_CLK=y
diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
index 118d8e86594..1ca5ab96cc1 100644
--- a/configs/imx8qxp_mek_defconfig
+++ b/configs/imx8qxp_mek_defconfig
@@ -49,6 +49,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_CLK=y
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index c8f5f5b0dae..a8d3992bdc9 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -80,6 +80,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SPL_DM=y
diff --git a/configs/j721e_hs_evm_a72_defconfig b/configs/j721e_hs_evm_a72_defconfig
index a7daa6556e6..55860a79fa7 100644
--- a/configs/j721e_hs_evm_a72_defconfig
+++ b/configs/j721e_hs_evm_a72_defconfig
@@ -73,6 +73,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SPL_DM=y
diff --git a/configs/j721e_hs_evm_r5_defconfig b/configs/j721e_hs_evm_r5_defconfig
index 62c3bc506b1..f4faa740686 100644
--- a/configs/j721e_hs_evm_r5_defconfig
+++ b/configs/j721e_hs_evm_r5_defconfig
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_DM=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig
index b8b14646612..9b50a4c7fec 100644
--- a/configs/jetson-tk1_defconfig
+++ b/configs/jetson-tk1_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/kp_imx6q_tpc_defconfig b/configs/kp_imx6q_tpc_defconfig
index 676c5c30b03..21bdeefc6ef 100644
--- a/configs/kp_imx6q_tpc_defconfig
+++ b/configs/kp_imx6q_tpc_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
# CONFIG_BLOCK_CACHE is not set
CONFIG_SPL_CLK_IMX6Q=y
CONFIG_CLK_IMX6Q=y
diff --git a/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig b/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
index a2b64c52a3a..39495de8011 100644
--- a/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
@@ -42,6 +42,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_VITESSE=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
+CONFIG_FMAN_ENET=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
diff --git a/configs/ls1046afrwy_tfa_defconfig b/configs/ls1046afrwy_tfa_defconfig
index 4251a7cb816..74863af4af1 100644
--- a/configs/ls1046afrwy_tfa_defconfig
+++ b/configs/ls1046afrwy_tfa_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_VITESSE=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
+CONFIG_FMAN_ENET=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
diff --git a/configs/mx6dlarm2_defconfig b/configs/mx6dlarm2_defconfig
index 4d5a0bd2307..8d99ae94718 100644
--- a/configs/mx6dlarm2_defconfig
+++ b/configs/mx6dlarm2_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_FSL_USDHC=y
CONFIG_MII=y
CONFIG_MXC_UART=y
diff --git a/configs/mx6dlarm2_lpddr2_defconfig b/configs/mx6dlarm2_lpddr2_defconfig
index a9a7c69b181..50f5f9589b2 100644
--- a/configs/mx6dlarm2_lpddr2_defconfig
+++ b/configs/mx6dlarm2_lpddr2_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_FSL_USDHC=y
CONFIG_MII=y
CONFIG_MXC_UART=y
diff --git a/configs/mx6qarm2_defconfig b/configs/mx6qarm2_defconfig
index 5d115e096dc..134988e6ac7 100644
--- a/configs/mx6qarm2_defconfig
+++ b/configs/mx6qarm2_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_FSL_USDHC=y
CONFIG_MII=y
CONFIG_MXC_UART=y
diff --git a/configs/mx6qarm2_lpddr2_defconfig b/configs/mx6qarm2_lpddr2_defconfig
index bd3ba1649d2..a38c56e47eb 100644
--- a/configs/mx6qarm2_lpddr2_defconfig
+++ b/configs/mx6qarm2_lpddr2_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_FSL_USDHC=y
CONFIG_MII=y
CONFIG_MXC_UART=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index df7f443e700..f1027d42869 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -68,6 +68,7 @@ CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x12000000
diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index cd2fecca0cf..b2773c38dc7 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -34,6 +34,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_DM=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index d547945ae67..f8c38310c16 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -43,6 +43,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_DM=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
index 9ff5b8aff14..16f27956d27 100644
--- a/configs/mx6sxsabresd_defconfig
+++ b/configs/mx6sxsabresd_defconfig
@@ -38,6 +38,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index cdb297d8d04..5a991954c72 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -51,6 +51,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_DM_74X164=y
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index 080eb14747b..8680983d5cb 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -46,6 +46,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
diff --git a/configs/mx6ull_14x14_evk_defconfig b/configs/mx6ull_14x14_evk_defconfig
index 5131213475b..e0440aaee0f 100644
--- a/configs/mx6ull_14x14_evk_defconfig
+++ b/configs/mx6ull_14x14_evk_defconfig
@@ -31,6 +31,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM_74X164=y
CONFIG_DM_I2C=y
diff --git a/configs/mx6ull_14x14_evk_plugin_defconfig b/configs/mx6ull_14x14_evk_plugin_defconfig
index 4a469ad2867..ebd74c17ddb 100644
--- a/configs/mx6ull_14x14_evk_plugin_defconfig
+++ b/configs/mx6ull_14x14_evk_plugin_defconfig
@@ -32,6 +32,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM_74X164=y
CONFIG_DM_I2C=y
diff --git a/configs/mx6ulz_14x14_evk_defconfig b/configs/mx6ulz_14x14_evk_defconfig
index e06d55f7a97..80bb1a236e0 100644
--- a/configs/mx6ulz_14x14_evk_defconfig
+++ b/configs/mx6ulz_14x14_evk_defconfig
@@ -29,6 +29,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
# CONFIG_NET is not set
CONFIG_DM_74X164=y
diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig
index c79b93c4fdf..45a06a11dac 100644
--- a/configs/nyan-big_defconfig
+++ b/configs/nyan-big_defconfig
@@ -46,6 +46,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index 512021dd37a..2e0ebc416be 100644
--- a/configs/omap4_sdp4430_defconfig
+++ b/configs/omap4_sdp4430_defconfig
@@ -31,6 +31,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_DM=y
CONFIG_DM_MMC=y
CONFIG_MMC_OMAP_HS=y
diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig
index 0361bff03ad..f8b57cfcc68 100644
--- a/configs/omap5_uevm_defconfig
+++ b/configs/omap5_uevm_defconfig
@@ -32,6 +32,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM=y
CONFIG_SCSI_AHCI=y
diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig
index 9ae06ecf698..a4916fbf2c2 100644
--- a/configs/opos6uldev_defconfig
+++ b/configs/opos6uldev_defconfig
@@ -67,6 +67,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig
index 74310849a93..7090aae8662 100644
--- a/configs/p2371-0000_defconfig
+++ b/configs/p2371-0000_defconfig
@@ -25,6 +25,7 @@ CONFIG_BOOTP_PREFER_SERVERIP=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig
index 77bbdcca19d..83eb44f3fd4 100644
--- a/configs/p2371-2180_defconfig
+++ b/configs/p2371-2180_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig
index 608300a8831..f1a650d1563 100644
--- a/configs/p2571_defconfig
+++ b/configs/p2571_defconfig
@@ -25,6 +25,7 @@ CONFIG_BOOTP_PREFER_SERVERIP=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig
index e1f665faa19..7858fd6b4af 100644
--- a/configs/p2771-0000-000_defconfig
+++ b/configs/p2771-0000-000_defconfig
@@ -24,6 +24,7 @@ CONFIG_BOOTP_PREFER_SERVERIP=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SYS_I2C_TEGRA=y
CONFIG_TEGRA186_BPMP_I2C=y
CONFIG_DWC_ETH_QOS=y
diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig
index d6a6db68756..33c4c70148f 100644
--- a/configs/p2771-0000-500_defconfig
+++ b/configs/p2771-0000-500_defconfig
@@ -24,6 +24,7 @@ CONFIG_BOOTP_PREFER_SERVERIP=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SYS_I2C_TEGRA=y
CONFIG_TEGRA186_BPMP_I2C=y
CONFIG_DWC_ETH_QOS=y
diff --git a/configs/paz00_defconfig b/configs/paz00_defconfig
index 435779b4d28..d95d6591590 100644
--- a/configs/paz00_defconfig
+++ b/configs/paz00_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DM_PMIC=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 9619aa6a71c..a754d24a0be 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -39,6 +39,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SYSCON=y
diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
index 78178e2152a..3ab1d66b60d 100644
--- a/configs/pico-imx8mq_defconfig
+++ b/configs/pico-imx8mq_defconfig
@@ -39,6 +39,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
index 0fed34db937..3b8f1faaece 100644
--- a/configs/puma-rk3399_defconfig
+++ b/configs/puma-rk3399_defconfig
@@ -43,6 +43,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent assigned-cl
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
index 80fa7acd27e..25b72117ea7 100644
--- a/configs/r8a774a1_beacon_defconfig
+++ b/configs/r8a774a1_beacon_defconfig
@@ -32,6 +32,8 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig
index d003ec68023..efdb8e6eb7e 100644
--- a/configs/r8a77990_ebisu_defconfig
+++ b/configs/r8a77990_ebisu_defconfig
@@ -35,6 +35,8 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index 5051984739a..b4962300bca 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -35,6 +35,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig
index d2b17237591..0fbd1e0c826 100644
--- a/configs/rcar3_salvator-x_defconfig
+++ b/configs/rcar3_salvator-x_defconfig
@@ -38,6 +38,8 @@ CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index f9ed9fa1df2..710b2f4a4aa 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -38,6 +38,8 @@ CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index c33ea6e4267..1aeeb08ac35 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -23,6 +23,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_DM=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
diff --git a/configs/riotboard_spl_defconfig b/configs/riotboard_spl_defconfig
index 1bc1c54026d..c56702c33cd 100644
--- a/configs/riotboard_spl_defconfig
+++ b/configs/riotboard_spl_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_DM=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index 40e60707a21..624f71df581 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -43,6 +43,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne
CONFIG_TPL_OF_PLATDATA=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TPL_DM=y
CONFIG_REGMAP=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index ad4bb6e3689..5f8ad1c1909 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -45,6 +45,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne
CONFIG_TPL_OF_PLATDATA=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TPL_DM=y
CONFIG_REGMAP=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index a7f8823c6c9..e6922e286ae 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -43,6 +43,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne
CONFIG_TPL_OF_PLATDATA=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TPL_DM=y
CONFIG_REGMAP=y
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index aa0988cefa2..1d997847c25 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -30,6 +30,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
diff --git a/configs/s5p4418_nanopi2_defconfig b/configs/s5p4418_nanopi2_defconfig
index c1cd08abf65..048af7b88c1 100644
--- a/configs/s5p4418_nanopi2_defconfig
+++ b/configs/s5p4418_nanopi2_defconfig
@@ -92,6 +92,8 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_OFFSET=0x2E0200
CONFIG_ENV_SIZE=0x4000
CONFIG_CMD_SAVEENV=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_SYS_MMC_ENV_DEV=2
## Etc Command definition
# image info
diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig
index e4404580af5..0b6dd521bd6 100644
--- a/configs/seaboard_defconfig
+++ b/configs/seaboard_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_SYS_I2C_TEGRA=y
CONFIG_TEGRA_KEYBOARD=y
diff --git a/configs/sei510_defconfig b/configs/sei510_defconfig
index b74c7387bb6..fc846fa8ce3 100644
--- a/configs/sei510_defconfig
+++ b/configs/sei510_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_REGULATOR=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x6000000
diff --git a/configs/sei610_defconfig b/configs/sei610_defconfig
index 3c8b6fcbaac..16c0d828503 100644
--- a/configs/sei610_defconfig
+++ b/configs/sei610_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_REGULATOR=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x6000000
diff --git a/configs/somlabs_visionsom_6ull_defconfig b/configs/somlabs_visionsom_6ull_defconfig
index 7c9f237da8f..74f9a8a533d 100644
--- a/configs/somlabs_visionsom_6ull_defconfig
+++ b/configs/somlabs_visionsom_6ull_defconfig
@@ -34,6 +34,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_FSL_USDHC=y
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index f50a9952f49..510d090f32a 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -61,6 +61,8 @@ CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-ex
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_DM_I2C=y
diff --git a/configs/tec-ng_defconfig b/configs/tec-ng_defconfig
index d2413bffc8a..fc6bd5e9b20 100644
--- a/configs/tec-ng_defconfig
+++ b/configs/tec-ng_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT4_WRITE=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_SYS_I2C_TEGRA=y
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 2c3b2d4213d..44f2a70c86c 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -40,6 +40,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SYSCON=y
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index faa73d6bf8c..e6d30353b6d 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -41,6 +41,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SYSCON=y
diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig
index d9eedc2b870..c422e5b3c59 100644
--- a/configs/venice2_defconfig
+++ b/configs/venice2_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4_WRITE=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig
index b51254abf82..7bd60601c82 100644
--- a/configs/ventana_defconfig
+++ b/configs/ventana_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_SPL_DM=y
CONFIG_DM_PMIC=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index 937094ca9e9..1f7fb5b9576 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -63,6 +63,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=4096
diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig
index 145b7fb1daf..a4c40c07ca3 100644
--- a/configs/vining_2000_defconfig
+++ b/configs/vining_2000_defconfig
@@ -58,6 +58,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_RPMB=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index e8211b6a9cf..a93b960fc2c 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -37,6 +37,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SYSCON=y
diff --git a/configs/xpress_defconfig b/configs/xpress_defconfig
index 2e0260836d5..d1e0786bb04 100644
--- a/configs/xpress_defconfig
+++ b/configs/xpress_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
CONFIG_MTD=y
diff --git a/configs/xpress_spl_defconfig b/configs/xpress_spl_defconfig
index 536efa95d8e..10ce66b3e7a 100644
--- a/configs/xpress_spl_defconfig
+++ b/configs/xpress_spl_defconfig
@@ -42,6 +42,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=1
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
CONFIG_MTD=y
diff --git a/configs/zc5202_defconfig b/configs/zc5202_defconfig
index 23f1dc73825..72bf825ec77 100644
--- a/configs/zc5202_defconfig
+++ b/configs/zc5202_defconfig
@@ -40,6 +40,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
diff --git a/configs/zc5601_defconfig b/configs/zc5601_defconfig
index ba393579352..62cb213b111 100644
--- a/configs/zc5601_defconfig
+++ b/configs/zc5601_defconfig
@@ -39,6 +39,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=1
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
diff --git a/env/Kconfig b/env/Kconfig
index 5d0a8ecea06..af4d9cbaa4d 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -577,6 +577,25 @@ config SYS_RELOC_GD_ENV_ADDR
Relocate the early env_addr pointer so we know it is not inside
the binary. Some systems need this and for the rest, it doesn't hurt.
+config SYS_MMC_ENV_DEV
+ int "mmc device number"
+ depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
+ CMD_MVEBU_BUBT || FMAN_ENET || QE
+ default 0
+ help
+ MMC device number on the platform where the environment is stored.
+
+config SYS_MMC_ENV_PART
+ int "mmc partition number"
+ depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
+ default 0
+ help
+ MMC hardware partition device number on the platform where the
+ environment is stored. Note that this is not related to any software
+ defined partition table but instead if we are in the user area, which is
+ partition 0 or the first boot partition, which is 1 or some other defined
+ partition.
+
config USE_DEFAULT_ENV_FILE
bool "Create default environment from file"
help
diff --git a/env/mmc.c b/env/mmc.c
index af7e5fbac3a..ba872701b0d 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -24,10 +24,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !defined(CONFIG_SYS_MMC_ENV_DEV)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
__weak int mmc_get_env_dev(void)
{
return CONFIG_SYS_MMC_ENV_DEV;
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index d7dabf88210..806d1543281 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -636,7 +636,6 @@ extern unsigned long get_sdram_size(void);
*/
#if defined(CONFIG_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
-#define CONFIG_SYS_MMC_ENV_DEV 0
#elif defined(CONFIG_MTD_RAW_NAND)
#ifdef CONFIG_TPL_BUILD
#define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 4542dafacb3..65d3dfa0f0d 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -49,7 +49,6 @@
#if defined(CONFIG_SPIFLASH)
#elif defined(CONFIG_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
- #define CONFIG_SYS_MMC_ENV_DEV 0
#endif
#ifndef __ASSEMBLY__
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index f5c1ec0647b..201da871bdb 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -132,11 +132,6 @@
#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
#endif
-#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#ifndef __ASSEMBLY__
unsigned long get_board_sys_clk(void);
unsigned long get_board_ddr_clk(void);
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index a616871917e..aee00a86cfe 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -157,8 +157,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
#define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */
#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-#define CONFIG_SYS_MMC_ENV_DEV 0
#elif defined(CONFIG_MTD_RAW_NAND)
#ifdef CONFIG_NXP_ESBC
#define CONFIG_RAMBOOT_NAND
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 25309b23193..1735b170fd2 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -114,11 +114,6 @@
#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
#endif
-#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#ifndef __ASSEMBLY__
unsigned long get_board_sys_clk(void);
unsigned long get_board_ddr_clk(void);
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 104a5fd05d6..30e38444c0d 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -96,11 +96,6 @@
#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
#endif
-#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#ifndef __ASSEMBLY__
unsigned long get_board_sys_clk(void);
unsigned long get_board_ddr_clk(void);
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 86dc3ed9198..7f831fb8bca 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -274,11 +274,6 @@
"setenv bootargs config-addr=0x60000000; " \
"bootm 0x01000000 - 0x00f00000"
-#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#define CONFIG_SYS_CLK_FREQ 66666666
#define CONFIG_DDR_CLK_FREQ 133333333
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index c5daaadce78..c3cc72e13f7 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -32,9 +32,6 @@
#define FWENV_TYPE FWENV_NOR_FLASH
#if (FWENV_TYPE == FWENV_MMC)
-#ifndef CONFIG_SYS_MMC_ENV_DEV
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#endif
#define FWENV_ADDR1 -1
#define FWENV_ADDR2 -1
#define FWENV_ADDR3 -1
@@ -367,7 +364,6 @@
*/
#if !defined(CONFIG_ENV_FIT_UCBOOT) && defined(CONFIG_RAMBOOT_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
#define CONFIG_LOADS_ECHO /* echo on for serial download */
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 6de463efa1e..9c4ef369c5c 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -275,8 +275,6 @@
#if defined(CONFIG_SPI_BOOT)
/* SPL related */
#elif defined(CONFIG_EMMC_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 0
#define CONFIG_SYS_MMC_MAX_DEVICE 2
#elif defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index 7240ff69014..387d50d5119 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -26,23 +26,6 @@
#define V_OSCK 24000000 /* Clock output from T2 */
#define V_SCLK (V_OSCK)
-/*
- * in case of SD Card or Network boot we want to have a possibility to
- * debrick the shc, therefore do not read environment from eMMC
- */
-#if defined(CONFIG_SHC_SDBOOT) || defined(CONFIG_SHC_NETBOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#else
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#endif
-
-/*
- * Info when using boot partitions: As environment resides within first
- * 128 kB, MLO must start at 128 kB == 0x20000
- * ENV at MMC Boot0 Partition - 0/Undefined=user, 1=boot0, 2=boot1,
- * 4..7=general0..3
- */
-
#define CONFIG_HSMMC2_8BIT
#ifndef CONFIG_SHC_ICT
diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h
index 9087e04165f..16849d87011 100644
--- a/include/configs/am335x_sl50.h
+++ b/include/configs/am335x_sl50.h
@@ -75,11 +75,6 @@
/* disable EFI partitions and partition UUID support */
#endif
-#if defined(CONFIG_EMMC_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
-#endif
-
/* Network. */
#endif /* ! __CONFIG_AM335X_SL50_H */
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 7d986cf8a1c..c47ffccff15 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -16,10 +16,6 @@
#define CONFIG_IODELAY_RECALIBRATION
-/* MMC ENV related defines */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* eMMC */
-#define CONFIG_SYS_MMC_ENV_PART 0
-
#define CONFIG_SYS_BOOTM_LEN SZ_64M
#define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 19d861d4028..4de0dacee3c 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -140,12 +140,6 @@
EXTRA_ENV_RPROC_SETTINGS \
EXTRA_ENV_DFUARGS
-/* MMC ENV related defines */
-#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-#endif
-
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index b43e14012f3..db4e9011c0b 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -81,10 +81,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 eMMC */
-#define CONFIG_SYS_MMC_ENV_PART 1
-
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
/* On Apalis iMX8 USDHC1 is eMMC, USDHC2 is 8-bit and USDHC3 is 4-bit MMC/SD */
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index 519b3b78238..981f856efaa 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -19,10 +19,6 @@
#define FDT_MODULE "apalis-v1.2"
#define FDT_MODULE_V1_0 "apalis"
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-
/* PCI host support */
#undef CONFIG_PCI_SCAN_SHOW
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 8f526daee0e..f3156b02c9c 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -191,12 +191,4 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-/* environment organization */
-
-#if defined(CONFIG_ENV_IS_IN_MMC)
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-#endif
-
#endif /* __CONFIG_H */
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 701b34aa846..bf0aefda2ad 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -18,10 +18,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_APALIS_T30
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-
/* PCI networking support */
#define CONFIG_E1000_NO_NVM
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h
index 83f283593ba..bcd55bb8689 100644
--- a/include/configs/apx4devkit.h
+++ b/include/configs/apx4devkit.h
@@ -21,13 +21,6 @@
#define PHYS_SDRAM_1_SIZE 0x20000000 /* Max 512 MB RAM */
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
-/* Environment */
-
-/* Environment is in MMC */
-#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
/* Environment is in NAND */
#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_ENV_RANGE (384 * 1024)
diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h
index 53629743d9d..ba21149e43c 100644
--- a/include/configs/at91-sama5_common.h
+++ b/include/configs/at91-sama5_common.h
@@ -25,11 +25,6 @@
#define CONFIG_BOOTP_BOOTFILESIZE
#ifdef CONFIG_SD_BOOT
-
-#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#define CONFIG_BOOTCOMMAND "if test ! -n ${dtb_name}; then " \
"setenv dtb_name at91-${board_name}.dtb; " \
"fi; " \
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index e27c276a460..780bf0cce7a 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -129,7 +129,6 @@
#else /* CONFIG_SYS_USE_MMC */
/* bootstrap + u-boot + env + linux in mmc */
/* For FAT system, most cases it should be in the reserved sector */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_BOOTCOMMAND \
"fatload mmc 0:1 0x22000000 uImage; bootm"
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index 2ee07bafddd..fe99253e5a1 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -94,15 +94,6 @@
#else /* CONFIG_SD_BOOT */
-/* bootstrap + u-boot + env + linux in mmc */
-
-#ifdef CONFIG_ENV_IS_IN_MMC
-/* Use raw reserved sectors to save environment */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#else
-/* Use file in FAT file to save environment */
-#endif
-
#define CONFIG_BOOTCOMMAND \
"setenv bootargs ${console} ${mtdparts} ${bootargs_mmc};" \
"fatload mmc 0:1 0x21000000 dtb;" \
diff --git a/include/configs/bcm23550_w1d.h b/include/configs/bcm23550_w1d.h
index e771548aa67..05ada258eac 100644
--- a/include/configs/bcm23550_w1d.h
+++ b/include/configs/bcm23550_w1d.h
@@ -76,7 +76,6 @@
#define CONFIG_SYS_NS16550_COM1 0x3e000000
/* must fit into GPT:u-boot-env partition */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* console configuration */
#define CONFIG_SYS_CBSIZE 1024 /* Console buffer size */
diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
index d807997277a..c84a5ca2e5e 100644
--- a/include/configs/bcm28155_ap.h
+++ b/include/configs/bcm28155_ap.h
@@ -75,7 +75,6 @@
#define CONFIG_SYS_NS16550_COM1 0x3e000000
/* must fit into GPT:u-boot-env partition */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* console configuration */
#define CONFIG_SYS_CBSIZE 1024 /* Console buffer size */
diff --git a/include/configs/bcm7260.h b/include/configs/bcm7260.h
index 31fd6ec08bb..f72d62ec354 100644
--- a/include/configs/bcm7260.h
+++ b/include/configs/bcm7260.h
@@ -30,7 +30,5 @@
/*
* Environment configuration for eMMC.
*/
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
#endif /* __CONFIG_H */
diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h
index 039f4d6759c..14275abdc47 100644
--- a/include/configs/bcm_ns3.h
+++ b/include/configs/bcm_ns3.h
@@ -43,10 +43,6 @@
*/
#define CONFIG_SYS_BOOTM_LEN 0x01800000
-/* Env configuration */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
-
/* Access eMMC Boot_1 and Boot_2 partitions */
#define CONFIG_SUPPORT_EMMC_BOOT
diff --git a/include/configs/beacon-rzg2m.h b/include/configs/beacon-rzg2m.h
index 0e48fbd46ee..18d442e06a6 100644
--- a/include/configs/beacon-rzg2m.h
+++ b/include/configs/beacon-rzg2m.h
@@ -11,11 +11,6 @@
/* Ethernet RAVB */
#define CONFIG_BITBANGMII_MULTI
-/* Environment in eMMC, at the end of 2nd "boot sector" */
-/* #define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) */
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
-
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/beaver.h b/include/configs/beaver.h
index 1b6ba8c85d2..0daa20ed5ce 100644
--- a/include/configs/beaver.h
+++ b/include/configs/beaver.h
@@ -22,10 +22,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_BEAVER
-/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
-
/* SPI */
#define CONFIG_TEGRA_SLINK_CTRLS 6
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 729d4d9799b..f9a0632e543 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -177,18 +177,8 @@ NANDTGTS \
#define CONFIG_NAND_OMAP_GPMC_WSCFG 1
#endif /* CONFIG_MTD_RAW_NAND */
-#if defined(CONFIG_SPI)
-/* SPI Flash */
-/* Environment */
-#elif defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
-
-#elif defined(CONFIG_ENV_IS_IN_NAND)
-/* No NAND env support in SPL */
+#if defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_ENV_SIZE
-#else
-#error "no storage for Environment defined!"
#endif
#endif /* ! __CONFIG_BRPPT1_H__ */
diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
index 3a18aec5d33..d6a7af1a152 100644
--- a/include/configs/brxre1.h
+++ b/include/configs/brxre1.h
@@ -64,7 +64,5 @@ BUR_COMMON_ENV \
#define CONFIG_INITRD_TAG
/* Environment */
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
#endif /* __CONFIG_BRXRE1_H__ */
diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h
index cd5538df7c6..7c168f17d5b 100644
--- a/include/configs/capricorn-common.h
+++ b/include/configs/capricorn-common.h
@@ -133,10 +133,6 @@
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
-/* Environment organisation */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1, eMMC */
-#define CONFIG_SYS_MMC_ENV_PART 2 /* 2nd boot partition */
-
/* On CCP board, USDHC1 is for eMMC */
#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* eMMC */
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
index 7eeadfc9c3d..8e8b1067b1d 100644
--- a/include/configs/cardhu.h
+++ b/include/configs/cardhu.h
@@ -26,10 +26,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_CARDHU
-/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
-
/* SPI */
#define CONFIG_TEGRA_SLINK_CTRLS 6
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/cei-tk1-som.h b/include/configs/cei-tk1-som.h
index dbebef34e38..dd3bdacc2c4 100644
--- a/include/configs/cei-tk1-som.h
+++ b/include/configs/cei-tk1-som.h
@@ -22,10 +22,6 @@
#define CONFIG_TEGRA_ENABLE_UARTD
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
-/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
-
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index a2cc4f9fa83..d2a0f95c0f8 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -86,7 +86,6 @@
#define CONFIG_MXC_UART_BASE UART2_BASE
#define CONSOLE_DEV "ttymxc1"
#define CONFIG_MMCROOT "/dev/mmcblk0p2"
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
@@ -200,9 +199,4 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-/* Environment organization */
-#if defined (CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#endif /* __CONFIG_CGTQMX6EVAL_H */
diff --git a/include/configs/chiliboard.h b/include/configs/chiliboard.h
index a2d198c5197..86cac236f96 100644
--- a/include/configs/chiliboard.h
+++ b/include/configs/chiliboard.h
@@ -161,8 +161,6 @@
#if defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
-#else
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
/* Network. */
diff --git a/include/configs/ci20.h b/include/configs/ci20.h
index c574337e84f..6e46d29c855 100644
--- a/include/configs/ci20.h
+++ b/include/configs/ci20.h
@@ -38,9 +38,6 @@
#define DM9000_IO CONFIG_DM9000_BASE
#define DM9000_DATA (CONFIG_DM9000_BASE + 2)
-/* Environment */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
#define CONFIG_SYS_MAXARGS 32 /* Max number of command args */
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 74be2f13785..5441da8c9cd 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -30,7 +30,6 @@
#define CONFIG_ENV_MIN_ENTRIES 128
/* Environment in MMC */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/*
* For SD - reserve 1 LBA for MBR + 1M for u-boot image. The MMC/eMMC
* boot image starts @ LBA-0.
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index a94d2bbeacd..29a37ed44fd 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -114,8 +114,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 eMMC */
-#define CONFIG_SYS_MMC_ENV_PART 1
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 79003e32510..7091766fef2 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -170,12 +170,4 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-/* environment organization */
-
-#if defined(CONFIG_ENV_IS_IN_MMC)
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-#endif
-
#endif /* __CONFIG_H */
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 1afa9373a16..8fff2e15b78 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -193,14 +193,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-/* environment organization */
-
-#if defined(CONFIG_ENV_IS_IN_MMC)
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-#endif
-
#ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND
/* NAND stuff */
#define CONFIG_SYS_MAX_NAND_DEVICE 1
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 4e5e89b547d..fa0fa93b030 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -20,10 +20,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_COLIBRI_T30
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-
/* General networking support */
#define CONFIG_TFTP_TSIZE
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 512d8e16eee..8ab8bb9f33c 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -268,7 +268,6 @@
#if defined(CONFIG_TRAILBLAZER)
#elif defined(CONFIG_RAMBOOT_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
#define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index dafef2fe9c9..731f884f405 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -62,7 +62,6 @@
#if defined(CONFIG_SPIFLASH)
#elif defined(CONFIG_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
#define CONFIG_SYS_CLK_FREQ get_board_sys_clk() /* sysclk for MPC85xx */
diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h
index 82e8e72a0b8..9a8735f8500 100644
--- a/include/configs/cyrus.h
+++ b/include/configs/cyrus.h
@@ -50,7 +50,6 @@
#if defined(CONFIG_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
/*
diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h
index 0cfc197142e..18d9ba1784d 100644
--- a/include/configs/dalmore.h
+++ b/include/configs/dalmore.h
@@ -20,8 +20,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_DALMORE
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/dart_6ul.h b/include/configs/dart_6ul.h
index d933f79e34e..b27f7157983 100644
--- a/include/configs/dart_6ul.h
+++ b/include/configs/dart_6ul.h
@@ -42,8 +42,6 @@
/* Environment settings */
/* Environment in SD */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
#define MMC_ROOTFS_DEV 0
#define MMC_ROOTFS_PART 2
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index 637716b5487..008a70a7c2e 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -48,7 +48,6 @@
/* MMC Configs */
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
#define CONFIG_SYS_FSL_USDHC_NUM 3
-#define CONFIG_SYS_MMC_ENV_DEV 2 /* 1 = SDHC3, 2 = SDHC4 (eMMC) */
/* SATA Configs */
#define CONFIG_LBA48
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 3ceb73385d8..cc18bcece4d 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -20,7 +20,6 @@
#ifndef CONFIG_QSPI_BOOT
/* MMC ENV related defines */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
#endif
#if (CONFIG_CONS_INDEX == 1)
diff --git a/include/configs/draak.h b/include/configs/draak.h
index 3248320b9d6..d28cc9d336e 100644
--- a/include/configs/draak.h
+++ b/include/configs/draak.h
@@ -18,8 +18,6 @@
#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
#define CONFIG_FLASH_SHOW_PROGRESS 45
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index 9362e9322cd..65537e47782 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -79,9 +79,6 @@ REFLASH(dragonboard/u-boot.img, 8)\
"pxefile_addr_r=0x90100000\0"\
BOOTENV
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* mmc0 = emmc, mmc1 = sd */
-#define CONFIG_SYS_MMC_ENV_PART 2 /* Set env partition to BOOT2 partition */
-
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_8M)
diff --git a/include/configs/e2220-1170.h b/include/configs/e2220-1170.h
index c4349bda459..5ed62678ce7 100644
--- a/include/configs/e2220-1170.h
+++ b/include/configs/e2220-1170.h
@@ -18,8 +18,6 @@
#define CONFIG_TEGRA_ENABLE_UARTA
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/ebisu.h b/include/configs/ebisu.h
index 521a348435a..06cbb03dc6a 100644
--- a/include/configs/ebisu.h
+++ b/include/configs/ebisu.h
@@ -21,7 +21,5 @@
#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 2
-#define CONFIG_SYS_MMC_ENV_PART 2
#endif /* __EBISU_H */
diff --git a/include/configs/edison.h b/include/configs/edison.h
index 3918a9fc1c3..606c656a727 100644
--- a/include/configs/edison.h
+++ b/include/configs/edison.h
@@ -26,8 +26,6 @@
#define CONFIG_SYS_MALLOC_LEN (128 * 1024 * 1024)
/* Environment */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
/* RTC */
#define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0
diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index d18342ade5a..bd61f20a7a6 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -86,9 +86,4 @@
/* environment organization */
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
-#endif
-
#endif /* __EL6Q_COMMON_CONFIG_H */
diff --git a/include/configs/elgin_rv1108.h b/include/configs/elgin_rv1108.h
index aa6c4b09e27..df04892e5fa 100644
--- a/include/configs/elgin_rv1108.h
+++ b/include/configs/elgin_rv1108.h
@@ -8,6 +8,4 @@
#include <configs/rv1108_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h
index 565cc8818e7..8148453d931 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -65,7 +65,6 @@
/* RiOTboard */
#define CONFIG_FDTFILE "imx6dl-riotboard.dtb"
#define CONFIG_SYS_FSL_USDHC_NUM 3
-#define CONFIG_SYS_MMC_ENV_DEV 2 /* SDHC4 */
#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
/* MarSBoard */
#define CONFIG_FDTFILE "imx6q-marsboard.dtb"
diff --git a/include/configs/evb_px30.h b/include/configs/evb_px30.h
index e761c7c5196..27201fcfd7c 100644
--- a/include/configs/evb_px30.h
+++ b/include/configs/evb_px30.h
@@ -8,8 +8,6 @@
#include <configs/px30_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define ROCKCHIP_DEVICE_SETTINGS \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
diff --git a/include/configs/evb_px5.h b/include/configs/evb_px5.h
index ed801dd8455..13ddc18b347 100644
--- a/include/configs/evb_px5.h
+++ b/include/configs/evb_px5.h
@@ -8,6 +8,4 @@
#include <configs/rk3368_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/evb_rk3128.h b/include/configs/evb_rk3128.h
index bf6c7eaf4c1..768004a43c8 100644
--- a/include/configs/evb_rk3128.h
+++ b/include/configs/evb_rk3128.h
@@ -8,6 +8,4 @@
#include <configs/rk3128_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/evb_rk3229.h b/include/configs/evb_rk3229.h
index 6a91a82ceb4..77d99d0a42b 100644
--- a/include/configs/evb_rk3229.h
+++ b/include/configs/evb_rk3229.h
@@ -8,6 +8,4 @@
#include <configs/rk322x_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/evb_rk3288.h b/include/configs/evb_rk3288.h
index e19fa902128..053c9032e2d 100644
--- a/include/configs/evb_rk3288.h
+++ b/include/configs/evb_rk3288.h
@@ -13,6 +13,4 @@
#include <configs/rk3288_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/evb_rk3308.h b/include/configs/evb_rk3308.h
index 0d2cb21ac67..e8893eb7de8 100644
--- a/include/configs/evb_rk3308.h
+++ b/include/configs/evb_rk3308.h
@@ -9,7 +9,6 @@
#include <configs/rk3308_common.h>
#define CONFIG_SUPPORT_EMMC_RPMB
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define ROCKCHIP_DEVICE_SETTINGS \
"stdout=serial,vidconsole\0" \
diff --git a/include/configs/evb_rk3328.h b/include/configs/evb_rk3328.h
index 26687e63861..cac613d021a 100644
--- a/include/configs/evb_rk3328.h
+++ b/include/configs/evb_rk3328.h
@@ -8,8 +8,6 @@
#include <configs/rk3328_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 1
-
#define SDRAM_BANK_SIZE (2UL << 30)
#endif
diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
index 2d3db22877d..b7e850370b3 100644
--- a/include/configs/evb_rk3399.h
+++ b/include/configs/evb_rk3399.h
@@ -13,10 +13,6 @@
#include <configs/rk3399_common.h>
-#if defined(CONFIG_ENV_IS_IN_MMC)
-# define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#define SDRAM_BANK_SIZE (2UL << 30)
#endif
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index dff6a26f3b9..9297fbdc081 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -72,8 +72,6 @@
#define CONFIG_SYS_MONITOR_BASE 0x00000000
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define CONFIG_SECURE_BL1_ONLY
/* Secure FW size configuration */
diff --git a/include/configs/firefly-rk3288.h b/include/configs/firefly-rk3288.h
index 9e4a66902b5..df96c32952f 100644
--- a/include/configs/firefly-rk3288.h
+++ b/include/configs/firefly-rk3288.h
@@ -13,6 +13,4 @@
#include <configs/rk3288_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/firefly_rk3308.h b/include/configs/firefly_rk3308.h
index 7b8b62fbcb1..3af24930431 100644
--- a/include/configs/firefly_rk3308.h
+++ b/include/configs/firefly_rk3308.h
@@ -9,7 +9,6 @@
#include <configs/rk3308_common.h>
#define CONFIG_SUPPORT_EMMC_RPMB
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define ROCKCHIP_DEVICE_SETTINGS \
"stdout=serial,vidconsole\0" \
diff --git a/include/configs/gru.h b/include/configs/gru.h
index a0d27b6d51a..be2dc79968c 100644
--- a/include/configs/gru.h
+++ b/include/configs/gru.h
@@ -13,6 +13,4 @@
#include <configs/rk3399_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 38e8e8e1311..a666d420e4b 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -146,10 +146,6 @@
*/
/* Persistent Environment Config */
-#if defined(CONFIG_ENV_IS_IN_MMC)
- #define CONFIG_SYS_MMC_ENV_DEV 0
- #define CONFIG_SYS_MMC_ENV_PART 1
-#endif
/* Environment */
#define CONFIG_IPADDR 192.168.1.1
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index 2f4b67025ce..396870a67f2 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -30,7 +30,6 @@
#define CONFIG_ENV_MIN_ENTRIES 128
/* Environment in MMC */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/*
* For SD - reserve 1 LBA for MBR + 1M for u-boot image. The MMC/eMMC
* boot image starts @ LBA-0.
diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index 70cd682ca95..a323a0bf69b 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -80,8 +80,6 @@
BOOTENV
/* Preserve environment on eMMC */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* Use eMMC */
-#define CONFIG_SYS_MMC_ENV_PART 2 /* Use Boot1 partition */
/* Monitor Command Prompt */
#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index c169347a759..9bd81e28d67 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -136,9 +136,6 @@
#endif
/* MMC */
-#ifdef CONFIG_FSL_USDHC
-# define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* NAND */
#ifdef CONFIG_NAND_MXS
diff --git a/include/configs/imx6dl-mamoj.h b/include/configs/imx6dl-mamoj.h
index fd35bf598fd..4027f329d30 100644
--- a/include/configs/imx6dl-mamoj.h
+++ b/include/configs/imx6dl-mamoj.h
@@ -43,7 +43,6 @@
#define CONFIG_MXC_UART_BASE UART3_BASE
/* MMC */
-#define CONFIG_SYS_MMC_ENV_DEV 2
/* Ethernet */
#define CONFIG_FEC_MXC_PHYADDR 1
diff --git a/include/configs/imx8mm_beacon.h b/include/configs/imx8mm_beacon.h
index 9aef3d743eb..3c9541187f8 100644
--- a/include/configs/imx8mm_beacon.h
+++ b/include/configs/imx8mm_beacon.h
@@ -106,8 +106,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
-
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN SZ_32M
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index b37788ed1ef..57971ca7142 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -109,7 +109,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* Size of malloc() pool */
diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
index 21eb134e7b1..d819266f99e 100644
--- a/include/configs/imx8mn_evk.h
+++ b/include/configs/imx8mn_evk.h
@@ -113,7 +113,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* Size of malloc() pool */
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 009bcdcc835..ded0717ddb7 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -121,7 +121,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* Size of malloc() pool */
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 1a50559b486..d98f9263ca9 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -163,7 +163,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* Size of malloc() pool */
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index ee024bca5c5..e8b65a4ba5c 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -153,7 +153,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* Size of malloc() pool */
diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h
index 5fcc9be0a12..ff281d3800d 100644
--- a/include/configs/imx8qm_mek.h
+++ b/include/configs/imx8qm_mek.h
@@ -152,12 +152,10 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
/* Default environment is in SD */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
/* On LPDDR4 board, USDHC1 is for eMMC, USDHC2 is for SD on CPU board */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
#define CONFIG_SYS_FSL_USDHC_NUM 2
diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
index 0976b73ebb2..e5989ebafbc 100644
--- a/include/configs/imx8qm_rom7720.h
+++ b/include/configs/imx8qm_rom7720.h
@@ -135,8 +135,6 @@
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
-#else
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#endif
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
@@ -145,7 +143,6 @@
* USDHC3 is for SD on base board On DDR4 board, USDHC1 is mux for NAND,
* USDHC2 is for SD, USDHC3 is for SD on base board
*/
-#define CONFIG_SYS_MMC_ENV_DEV 2 /* USDHC3 */
#define CONFIG_MMCROOT "/dev/mmcblk2p2" /* USDHC3 */
#define CONFIG_SYS_FSL_USDHC_NUM 3
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index 67df1998cbd..51a8eb67605 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -151,12 +151,10 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
/* Default environment is in SD */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
/* On LPDDR4 board, USDHC1 is for eMMC, USDHC2 is for SD on CPU board */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
#define CONFIG_SYS_FSL_USDHC_NUM 2
diff --git a/include/configs/imxrt1020-evk.h b/include/configs/imxrt1020-evk.h
index 8e54565f1af..4fb44774b0c 100644
--- a/include/configs/imxrt1020-evk.h
+++ b/include/configs/imxrt1020-evk.h
@@ -28,8 +28,6 @@
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
DMAMEM_SZ_ALL)
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
-
/*
* Configuration of the external SDRAM memory
*/
diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h
index 3a6b972d9ac..4fbcda9581c 100644
--- a/include/configs/imxrt1050-evk.h
+++ b/include/configs/imxrt1050-evk.h
@@ -28,8 +28,6 @@
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
DMAMEM_SZ_ALL)
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
-
#ifdef CONFIG_DM_VIDEO
#define CONFIG_VIDEO_MXS
#define CONFIG_VIDEO_LOGO
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index 7b917c22477..e1681af3f69 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -150,9 +150,5 @@
#include <configs/ti_armv7_common.h>
/* MMC ENV related defines */
-#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-#endif
#endif /* __CONFIG_J721E_EVM_H */
diff --git a/include/configs/jetson-tk1.h b/include/configs/jetson-tk1.h
index 98248876e8e..a3c385b6e22 100644
--- a/include/configs/jetson-tk1.h
+++ b/include/configs/jetson-tk1.h
@@ -19,8 +19,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h
index cb24a896a14..c94882846ef 100644
--- a/include/configs/kp_imx53.h
+++ b/include/configs/kp_imx53.h
@@ -94,6 +94,5 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif /* __CONFIG_H_ */
diff --git a/include/configs/kp_imx6q_tpc.h b/include/configs/kp_imx6q_tpc.h
index 6c9a326b259..749e880f36f 100644
--- a/include/configs/kp_imx6q_tpc.h
+++ b/include/configs/kp_imx6q_tpc.h
@@ -27,8 +27,6 @@
/* FEC ethernet */
#define CONFIG_ARP_TIMEOUT 200UL
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* 0 = SDHC2, 1 = SDHC4 (eMMC) */
-
/* USB Configs */
#ifdef CONFIG_CMD_USB
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index 1ef7633633f..75fc03f1472 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -12,8 +12,6 @@
#ifndef CONFIG_SPL_BUILD
/* Store env in emmc */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* emmc */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#endif
diff --git a/include/configs/lion_rk3368.h b/include/configs/lion_rk3368.h
index cae0f1ed29d..c5b78f9c896 100644
--- a/include/configs/lion_rk3368.h
+++ b/include/configs/lion_rk3368.h
@@ -8,7 +8,6 @@
#include <configs/rk3368_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define KERNEL_LOAD_ADDR 0x280000
#define DTB_LOAD_ADDR 0x5600000
#define INITRD_LOAD_ADDR 0x5bf0000
diff --git a/include/configs/liteboard.h b/include/configs/liteboard.h
index 2dcd4db28cb..db5e6fc133b 100644
--- a/include/configs/liteboard.h
+++ b/include/configs/liteboard.h
@@ -121,8 +121,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* FLASH and environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
#define CONFIG_MMCROOT "/dev/mmcblk0p2"
/* USB Configs */
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h
index 70bca320fbd..cf4d60ad603 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -214,14 +214,6 @@
#define CONFIG_SYS_QE_FW_ADDR 0x67f40000
-/*
- * Environment
- */
-
-#if defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#define CONFIG_OF_BOARD_SETUP
#define CONFIG_OF_STDOUT_VIA_ALIAS
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 84b7f0e13da..eb6f1c1e5be 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -473,10 +473,6 @@ unsigned long get_board_ddr_clk(void);
* Environment
*/
-#if defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#include <asm/fsl_secure_boot.h>
#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h
index e095e9ad100..996c970ec84 100644
--- a/include/configs/ls1021atsn.h
+++ b/include/configs/ls1021atsn.h
@@ -237,10 +237,6 @@
/* Environment */
-#if defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#define CONFIG_SYS_BOOTM_LEN 0x8000000 /* 128 MB */
#endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 914d059a563..3e85bb3850b 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -446,10 +446,6 @@
* Environment
*/
-#if defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#include <asm/fsl_secure_boot.h>
#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h
index c2071e70b44..8345cd7acfc 100644
--- a/include/configs/ls1028a_common.h
+++ b/include/configs/ls1028a_common.h
@@ -91,7 +91,6 @@
#define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
#endif
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define OCRAM_NONSECURE_SIZE 0x00010000
#define CONFIG_SYS_FSL_QSPI_BASE 0x20000000
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index 6ff7f018344..1636f0bb8ff 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -395,15 +395,6 @@ unsigned long get_board_ddr_clk(void);
* Environment
*/
-#ifdef CONFIG_TFABOOT
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#else
-#ifdef CONFIG_NAND_BOOT
-#elif defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-#endif
-
#define CONFIG_CMDLINE_TAG
#include <asm/fsl_secure_boot.h>
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index a3f47c37ac1..84b83e62595 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -241,15 +241,6 @@
* Environment
*/
-#ifdef CONFIG_TFABOOT
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#else
-#if defined(CONFIG_NAND_BOOT)
-#elif defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-#endif
-
/* FMan */
#ifndef SPL_NO_FMAN
#define AQR105_IRQ_MASK 0x40000000
diff --git a/include/configs/ls1046afrwy.h b/include/configs/ls1046afrwy.h
index 44e7fc3a72c..fade815f260 100644
--- a/include/configs/ls1046afrwy.h
+++ b/include/configs/ls1046afrwy.h
@@ -96,7 +96,6 @@
/*
* Environment
*/
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_FSL_QSPI_BASE 0x40000000
#ifndef CONFIG_SPL_BUILD
@@ -109,7 +108,6 @@
/* FMan */
#ifdef CONFIG_SYS_DPAA_FMAN
-#define CONFIG_FMAN_ENET
#define QSGMII_PORT1_PHY_ADDR 0x1c
#define QSGMII_PORT2_PHY_ADDR 0x1d
diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index 969d2c540ba..9102c812b5b 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -409,7 +409,6 @@ unsigned long get_board_ddr_clk(void);
/*
* Environment
*/
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_CMDLINE_TAG
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index fe8108dae03..dddaa254171 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -153,7 +153,6 @@
/*
* Environment
*/
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_FSL_QSPI_BASE 0x40000000
#define AQR105_IRQ_MASK 0x80000000
diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h
index 1e9e6a8f96e..b92ec14c691 100644
--- a/include/configs/ls1088aqds.h
+++ b/include/configs/ls1088aqds.h
@@ -15,14 +15,7 @@ unsigned long get_board_ddr_clk(void);
#endif
#ifdef CONFIG_TFABOOT
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define CONFIG_MISC_INIT_R
-#else
-#if defined(CONFIG_QSPI_BOOT)
-#elif defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
#endif
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index 28a458772d7..f59a9f5574e 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -8,8 +8,6 @@
#include "ls1088a_common.h"
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#if defined(CONFIG_TFABOOT) || \
defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 751325ad699..9e174afb92e 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -56,10 +56,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
-#ifdef CONFIG_TFABOOT
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
#define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024)
#define CONFIG_SYS_NOR_AMASK_EARLY IFC_AMASK(64*1024*1024)
@@ -227,8 +223,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SPL_PAD_TO 0x20000
#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 * 1024)
#define CONFIG_SYS_NAND_U_BOOT_SIZE (640 * 1024)
-#elif defined(CONFIG_SD_BOOT)
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
#else
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 006a4c97fb1..b7a7dc0a64a 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -70,9 +70,6 @@ unsigned long get_board_sys_clk(void);
#define CONFIG_SYS_SCSI_MAX_LUN 1
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
-#ifdef CONFIG_TFABOOT
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
#if !defined(CONFIG_FSL_QSPI) || defined(CONFIG_TFABOOT)
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index d3b5c58742d..0017ac57734 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -170,8 +170,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_HWCONFIG
#define HWCONFIG_BUFFER_SIZE 128
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
/* Monitor Command Prompt */
#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
diff --git a/include/configs/meerkat96.h b/include/configs/meerkat96.h
index 33172a6b97a..f43a8415e1a 100644
--- a/include/configs/meerkat96.h
+++ b/include/configs/meerkat96.h
@@ -33,8 +33,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* Environment configs */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
/* USB configs */
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h
index a4d9779667f..8fff915b50a 100644
--- a/include/configs/meson64_android.h
+++ b/include/configs/meson64_android.h
@@ -9,9 +9,6 @@
#ifndef __MESON64_ANDROID_CONFIG_H
#define __MESON64_ANDROID_CONFIG_H
-#define CONFIG_SYS_MMC_ENV_DEV 2
-#define CONFIG_SYS_MMC_ENV_PART 1
-
#define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \
"bootcmd_fastboot=" \
diff --git a/include/configs/miqi_rk3288.h b/include/configs/miqi_rk3288.h
index e19fa902128..053c9032e2d 100644
--- a/include/configs/miqi_rk3288.h
+++ b/include/configs/miqi_rk3288.h
@@ -13,6 +13,4 @@
#include <configs/rk3288_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/mt7622.h b/include/configs/mt7622.h
index 0d3e7086832..f015d10d9bd 100644
--- a/include/configs/mt7622.h
+++ b/include/configs/mt7622.h
@@ -20,8 +20,6 @@
#define CONFIG_SYS_MALLOC_LEN SZ_4M
#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
/* Uboot definition */
#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE
diff --git a/include/configs/mt7623.h b/include/configs/mt7623.h
index b7e9aff21c3..9895279749d 100644
--- a/include/configs/mt7623.h
+++ b/include/configs/mt7623.h
@@ -55,8 +55,6 @@
#define CONFIG_IPADDR 192.168.1.1
#define CONFIG_SERVERIP 192.168.1.2
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#ifdef CONFIG_DISTRO_DEFAULTS
#define BOOT_TARGET_DEVICES(func) \
diff --git a/include/configs/mt8512.h b/include/configs/mt8512.h
index 4feff271396..7cd388fa101 100644
--- a/include/configs/mt8512.h
+++ b/include/configs/mt8512.h
@@ -29,16 +29,10 @@
SZ_2M - \
GENERATED_GBL_DATA_SIZE)
-/* ENV Setting */
-#if defined(CONFIG_MMC_MTK)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
-/* MMC offset in block unit,and block size is 0x200 */
#define ENV_BOOT_READ_IMAGE \
"boot_rd_img=mmc dev 0" \
";mmc read ${loadaddr} 0x27000 0x8000" \
";iminfo ${loadaddr}\0"
-#endif
/* Console configuration */
#define ENV_DEVICE_SETTINGS \
diff --git a/include/configs/mt8518.h b/include/configs/mt8518.h
index 0d48211ce84..4e32442bb5a 100644
--- a/include/configs/mt8518.h
+++ b/include/configs/mt8518.h
@@ -32,16 +32,10 @@
SZ_2M - \
GENERATED_GBL_DATA_SIZE)
-/* ENV Setting */
-#if defined(CONFIG_MMC_MTK)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
-/* MMC offset in block unit,and block size is 0x200 */
#define ENV_BOOT_READ_IMAGE \
"boot_rd_img=mmc dev 0" \
";mmc read ${loadaddr} 0x27400 0x4000" \
";iminfo ${loadaddr}\0"
-#endif
/* Console configuration */
#define ENV_DEVICE_SETTINGS \
diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index 21a2ad4acbb..38f50468c54 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -46,7 +46,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0xFF0000)
/* When runtime detection fails this is the default */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 1
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index ad95b8876ec..2ee41aeff1b 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -15,13 +15,6 @@
#define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
-/* Environment */
-
-/* Environment is in MMC */
-#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
/* Status LED */
/* USB */
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h
index 560ec96c017..cc634d00422 100644
--- a/include/configs/mx23evk.h
+++ b/include/configs/mx23evk.h
@@ -21,9 +21,6 @@
/* Environment */
/* Environment is in MMC */
-#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* USB */
#ifdef CONFIG_CMD_USB
diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h
index 12bd75fe025..27d0c25ac73 100644
--- a/include/configs/mx25pdk.h
+++ b/include/configs/mx25pdk.h
@@ -46,7 +46,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
/* No NOR flash present */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* U-Boot general configuration */
#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 8ed139037e2..1a9e6a457af 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -21,9 +21,6 @@
/* Environment */
/* Environment is in MMC */
-#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* Environment is in NAND */
#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index dda21198d61..bf4661b4539 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -188,6 +188,5 @@
* write the direct value here
*/
#define CONFIG_BOARD_SIZE_LIMIT 785408
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h
index c20ca19557e..b613e9816da 100644
--- a/include/configs/mx53ard.h
+++ b/include/configs/mx53ard.h
@@ -161,7 +161,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define MX53ARD_CS1GCR1 (CSEN | DSZ(2))
#define MX53ARD_CS1RCR1 (RCSN(2) | OEN (1) | RWSC(22))
diff --git a/include/configs/mx53cx9020.h b/include/configs/mx53cx9020.h
index 13135f0d8bc..93158fb4646 100644
--- a/include/configs/mx53cx9020.h
+++ b/include/configs/mx53cx9020.h
@@ -91,7 +91,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* Framebuffer and LCD */
#define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h
index 1bb189f6db7..91a56dda289 100644
--- a/include/configs/mx53evk.h
+++ b/include/configs/mx53evk.h
@@ -112,6 +112,5 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif /* __CONFIG_H */
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 24c27505aee..97adcd5265b 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -167,7 +167,6 @@
* write the direct value here
*/
#define CONFIG_BOARD_SIZE_LIMIT 785408
-#define CONFIG_SYS_MMC_ENV_DEV 0
#ifdef CONFIG_CMD_SATA
#define CONFIG_SYS_SATA_MAX_DEVICE 1
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index a6905ec4bdf..d3133293c69 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -137,7 +137,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* FLASH and environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_FSL_IIM
diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h
index c19f5b63832..79c86725a27 100644
--- a/include/configs/mx53smd.h
+++ b/include/configs/mx53smd.h
@@ -107,6 +107,5 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif /* __CONFIG_H */
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index 57efe1bab6e..b03129bfc6a 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -45,7 +45,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
#define CONSOLE_DEV "ttymxc0"
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* SDHC2 */
#ifndef CONFIG_SPL_BUILD
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h
index cdc108a7356..83c09ead271 100644
--- a/include/configs/mx6qarm2.h
+++ b/include/configs/mx6qarm2.h
@@ -115,7 +115,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* Environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 1
/* USB Configs */
#ifdef CONFIG_CMD_USB
diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index e444930dc87..11896777182 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -49,9 +49,6 @@
#endif
#define CONFIG_SYS_FSL_USDHC_NUM 2
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* I2C Configs */
#define CONFIG_SYS_I2C
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index ec1537541ae..e8f52cee202 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -29,9 +29,6 @@
#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000 /* 2MB */
#define CONFIG_SYS_FSL_USDHC_NUM 3
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */
-#endif
#ifdef CONFIG_CMD_PCI
#define CONFIG_PCI_SCAN_SHOW
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h
index 3ee9cdd52d8..44dadd681c0 100644
--- a/include/configs/mx6slevk.h
+++ b/include/configs/mx6slevk.h
@@ -131,9 +131,6 @@
#endif
#define CONFIG_SYS_FSL_USDHC_NUM 3
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC2*/
-#endif
#define CONFIG_IMX_THERMAL
diff --git a/include/configs/mx6sllevk.h b/include/configs/mx6sllevk.h
index f13429d6ea5..9533d307428 100644
--- a/include/configs/mx6sllevk.h
+++ b/include/configs/mx6sllevk.h
@@ -117,13 +117,11 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* Environment organization */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user partition */
#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
/* MMC Configs */
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
#define CONFIG_SYS_FSL_USDHC_NUM 3
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
#define CONFIG_IMX_THERMAL
diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h
index 070216338bc..9ad29341c14 100644
--- a/include/configs/mx6sxsabreauto.h
+++ b/include/configs/mx6sxsabreauto.h
@@ -141,8 +141,5 @@
#define CONFIG_IMX_THERMAL
#define CONFIG_SYS_FSL_USDHC_NUM 2
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0 /*USDHC3*/
-#endif
#endif /* __CONFIG_H */
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index b30f9e51fbd..4a521ec80d9 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -186,8 +186,5 @@
#endif
#define CONFIG_SYS_FSL_USDHC_NUM 3
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 2 /*USDHC4*/
-#endif
#endif /* __CONFIG_H */
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index f83ad914dba..6f1e0d878da 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -151,8 +151,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* USB Configs */
diff --git a/include/configs/mx6ullevk.h b/include/configs/mx6ullevk.h
index e37559d9030..ca2f2bd975d 100644
--- a/include/configs/mx6ullevk.h
+++ b/include/configs/mx6ullevk.h
@@ -148,8 +148,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
#define CONFIG_IMX_THERMAL
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 7e1e8b02cb7..98fab6b83de 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -131,9 +131,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
#endif
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
-
/* USB Configs */
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h
index 29d17bab740..28672c4f94c 100644
--- a/include/configs/mx7ulp_com.h
+++ b/include/configs/mx7ulp_com.h
@@ -24,7 +24,6 @@
* write the direct value here
*/
#define CONFIG_BOARD_SIZE_LIMIT 785408
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_MMCROOT "/dev/mmcblk0p2"
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index 65dc8c8d58a..0c3103082cc 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -14,8 +14,6 @@
#define CONFIG_BOARD_POSTCLK_INIT
#define CONFIG_SYS_BOOTM_LEN 0x1000000
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 0f7d8e7cb51..0598224f667 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -145,10 +145,6 @@
/* Environment organization */
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
/*
* PCI express
*/
diff --git a/include/configs/novena.h b/include/configs/novena.h
index 14581e0be02..62faef0703e 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -24,9 +24,6 @@
* as recommended by GNU/fdisk. See below for details:
* http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/disc-partition-alignment.html
*/
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* Booting Linux */
#define CONFIG_BOOTFILE "fitImage"
diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h
index 97dd168b018..394fb15f313 100644
--- a/include/configs/nyan-big.h
+++ b/include/configs/nyan-big.h
@@ -19,8 +19,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* Align LCD to 1MB boundary */
#define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE
diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 5cbee010924..befb9f9aa15 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -45,8 +45,6 @@
#define CONFIG_SYS_MONITOR_BASE 0x00000000
-#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
-
/* Partitions name */
#define PARTS_BOOT "boot"
#define PARTS_ROOT "platform"
diff --git a/include/configs/odroid_go2.h b/include/configs/odroid_go2.h
index 00eac2d2a8e..53781ba7ae8 100644
--- a/include/configs/odroid_go2.h
+++ b/include/configs/odroid_go2.h
@@ -8,8 +8,6 @@
#include <configs/px30_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define ROCKCHIP_DEVICE_SETTINGS \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
diff --git a/include/configs/omap4_sdp4430.h b/include/configs/omap4_sdp4430.h
index 884f45df225..462aa4a5b90 100644
--- a/include/configs/omap4_sdp4430.h
+++ b/include/configs/omap4_sdp4430.h
@@ -20,6 +20,5 @@
#include <configs/ti_omap4_common.h>
/* ENV related config options */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
#endif /* __CONFIG_SDP4430_H */
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index 53589c03ead..a1f1dafad79 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -31,7 +31,6 @@
#define CONFIG_SYS_NS16550_COM3 UART3_BASE
/* MMC ENV related defines */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
/* Enhance our eMMC support / experience. */
#define CONFIG_HSMMC2_8BIT
diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h
index 3ef5ebbac79..69f5e9f96ab 100644
--- a/include/configs/opos6uldev.h
+++ b/include/configs/opos6uldev.h
@@ -59,8 +59,6 @@
#endif
/* Environment is stored in the eMMC boot partition */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
#define CONFIG_ENV_VERSION 100
#define CONFIG_BOARD_NAME opos6ul
diff --git a/include/configs/origen.h b/include/configs/origen.h
index 3bedc4784b7..24b0338deb3 100644
--- a/include/configs/origen.h
+++ b/include/configs/origen.h
@@ -77,7 +77,6 @@
/* MIU (Memory Interleaving Unit) */
#define CONFIG_MIU_2BIT_21_7_INTERLEAVED
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define RESERVE_BLOCK_SIZE (512)
#define BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index e686edcaef6..1b74177b2f2 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -695,7 +695,6 @@
*/
#if defined(CONFIG_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION
-#define CONFIG_SYS_MMC_ENV_DEV 0
#elif defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)
#ifdef CONFIG_TPL_BUILD
diff --git a/include/configs/p2371-0000.h b/include/configs/p2371-0000.h
index 8e3e1a77f5a..5cebafc7c7c 100644
--- a/include/configs/p2371-0000.h
+++ b/include/configs/p2371-0000.h
@@ -18,8 +18,6 @@
#define CONFIG_TEGRA_ENABLE_UARTA
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/p2371-2180.h b/include/configs/p2371-2180.h
index 7998eabd30c..5e1d50b2546 100644
--- a/include/configs/p2371-2180.h
+++ b/include/configs/p2371-2180.h
@@ -18,8 +18,6 @@
#define CONFIG_TEGRA_ENABLE_UARTA
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/p2571.h b/include/configs/p2571.h
index e7b860a30ec..0b3183a67dd 100644
--- a/include/configs/p2571.h
+++ b/include/configs/p2571.h
@@ -19,8 +19,6 @@
#define CONFIG_TEGRA_ENABLE_UARTA
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/p2771-0000.h b/include/configs/p2771-0000.h
index 7c6d68a4f11..4c3da224c66 100644
--- a/include/configs/p2771-0000.h
+++ b/include/configs/p2771-0000.h
@@ -14,8 +14,6 @@
#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P2771-0000"
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
#define BOARD_EXTRA_ENV_SETTINGS \
"calculated_vars=kernel_addr_r fdt_addr_r scriptaddr pxefile_addr_r " \
diff --git a/include/configs/paz00.h b/include/configs/paz00.h
index ae8e0dee2cd..7a09ac0dee7 100644
--- a/include/configs/paz00.h
+++ b/include/configs/paz00.h
@@ -22,8 +22,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_PAZ00
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
#include "tegra-common-post.h"
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
index 4ae955d9cac..d7c6f8808e0 100644
--- a/include/configs/pcl063_ull.h
+++ b/include/configs/pcl063_ull.h
@@ -24,8 +24,6 @@
/* Environment settings */
/* Environment in SD */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
#define MMC_ROOTFS_DEV 0
#define MMC_ROOTFS_PART 2
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index df5a2a1329b..960ff982d8b 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -155,8 +155,5 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
#endif
diff --git a/include/configs/phycore_am335x_r2.h b/include/configs/phycore_am335x_r2.h
index 4c02d8d375a..4a347fe154f 100644
--- a/include/configs/phycore_am335x_r2.h
+++ b/include/configs/phycore_am335x_r2.h
@@ -15,7 +15,6 @@
#include <configs/ti_am335x_common.h>
#define CONFIG_MACH_TYPE MACH_TYPE_SBC_PHYCORE_AM335X
-#define CONFIG_SYS_MMC_ENV_DEV 0
#ifdef CONFIG_MTD_RAW_NAND
#define NANDARGS \
diff --git a/include/configs/phycore_rk3288.h b/include/configs/phycore_rk3288.h
index 9135aa6b7a8..2b7a0670c02 100644
--- a/include/configs/phycore_rk3288.h
+++ b/include/configs/phycore_rk3288.h
@@ -16,6 +16,4 @@
func(MMC, mmc, 0) \
func(MMC, mmc, 1)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-
#endif
diff --git a/include/configs/pico-imx6.h b/include/configs/pico-imx6.h
index 814e4b027f9..7403c544a49 100644
--- a/include/configs/pico-imx6.h
+++ b/include/configs/pico-imx6.h
@@ -133,7 +133,6 @@
* write the direct value here
*/
#define CONFIG_BOARD_SIZE_LIMIT 715776
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* Ethernet Configuration */
#define CONFIG_FEC_MXC
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index d7942afb679..d712b638b4c 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -144,10 +144,6 @@
*/
#define CONFIG_BOARD_SIZE_LIMIT 715776
-
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
-
#ifdef CONFIG_VIDEO
#define CONFIG_VIDEO_MXS
#define CONFIG_VIDEO_LOGO
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 3ca3ec61126..f1b2ad4480c 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -166,9 +166,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
-
/* USB Configs */
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h
index 85807ff3b69..7a5891652fe 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -132,7 +132,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
/* Size of malloc() pool */
diff --git a/include/configs/platinum.h b/include/configs/platinum.h
index 77169f38bbe..325a28001e5 100644
--- a/include/configs/platinum.h
+++ b/include/configs/platinum.h
@@ -77,7 +77,6 @@
#else /* CONFIG_CMD_NAND */
/* Environment in MMC */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif /* CONFIG_CMD_NAND */
diff --git a/include/configs/poplar.h b/include/configs/poplar.h
index 2c7dc8bab61..9763218ecbb 100644
--- a/include/configs/poplar.h
+++ b/include/configs/poplar.h
@@ -51,9 +51,6 @@
"ramdisk_addr_r=0x32400000\0" \
BOOTENV
-
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
/* Monitor Command Prompt */
#define CONFIG_SYS_CBSIZE 512
#define CONFIG_SYS_MAXARGS 64
diff --git a/include/configs/popmetal_rk3288.h b/include/configs/popmetal_rk3288.h
index ddd7012c8f3..222e5aae743 100644
--- a/include/configs/popmetal_rk3288.h
+++ b/include/configs/popmetal_rk3288.h
@@ -9,6 +9,4 @@
#define ROCKCHIP_DEVICE_SETTINGS
#include <configs/rk3288_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/puma_rk3399.h b/include/configs/puma_rk3399.h
index 63f58bdbfec..5714437a001 100644
--- a/include/configs/puma_rk3399.h
+++ b/include/configs/puma_rk3399.h
@@ -8,10 +8,6 @@
#include <configs/rk3399_common.h>
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#endif
-
#define SDRAM_BANK_SIZE (2UL << 30)
#define CONFIG_SERIAL_TAG
diff --git a/include/configs/rock.h b/include/configs/rock.h
index d9177576add..96aefc19478 100644
--- a/include/configs/rock.h
+++ b/include/configs/rock.h
@@ -9,6 +9,4 @@
#define ROCKCHIP_DEVICE_SETTINGS
#include <configs/rk3188_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/rock2.h b/include/configs/rock2.h
index 9e4a66902b5..df96c32952f 100644
--- a/include/configs/rock2.h
+++ b/include/configs/rock2.h
@@ -13,6 +13,4 @@
#include <configs/rk3288_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/rock960_rk3399.h b/include/configs/rock960_rk3399.h
index 304ad2b7aae..c6f9122154a 100644
--- a/include/configs/rock960_rk3399.h
+++ b/include/configs/rock960_rk3399.h
@@ -13,8 +13,6 @@
#include <configs/rk3399_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 1
-
#define SDRAM_BANK_SIZE (2UL << 30)
#endif
diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h
index 020d1e01fac..275d92eff78 100644
--- a/include/configs/s32v234evb.h
+++ b/include/configs/s32v234evb.h
@@ -161,8 +161,6 @@
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define CONFIG_BOOTP_BOOTFILESIZE
diff --git a/include/configs/s5p4418_nanopi2.h b/include/configs/s5p4418_nanopi2.h
index da5b29a46ef..b54d2da9b46 100644
--- a/include/configs/s5p4418_nanopi2.h
+++ b/include/configs/s5p4418_nanopi2.h
@@ -102,11 +102,6 @@
/* Boot Argument Buffer Size */
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-/*-----------------------------------------------------------------------
- * allow to overwrite serial and ethaddr
- */
-#define CONFIG_ENV_OVERWRITE
-
#ifdef CONFIG_HUSH_PARSER
#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#endif
@@ -152,26 +147,6 @@
#endif
/*-----------------------------------------------------------------------
- * SD/MMC
- */
-#if defined(CONFIG_MMC)
-/* eMMC = 0, SD-card = 2 */
-#define CONFIG_SYS_MMC_DEV 2
-#define CONFIG_SYS_MMC_ENV_DEV CONFIG_SYS_MMC_DEV
-#endif
-
-/*-----------------------------------------------------------------------
- * Default environment organization
- */
-#if !defined(CONFIG_ENV_IS_IN_MMC) && !defined(CONFIG_ENV_IS_IN_NAND) && \
- !defined(CONFIG_ENV_IS_IN_FLASH) && !defined(CONFIG_ENV_IS_IN_EEPROM)
- /* default: CONFIG_ENV_IS_NOWHERE */
- #define CONFIG_ENV_IS_NOWHERE
- #define CONFIG_ENV_OFFSET 1024
- #define CONFIG_ENV_SIZE (4 * 1024) /* env size */
-#endif
-
-/*-----------------------------------------------------------------------
* VIDEO
*/
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index be8865b9c06..d6d07a95b68 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -161,7 +161,6 @@
/* FLASH and environment organization */
#define CONFIG_MMC_DEFAULT_DEV 0
-#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
#define CONFIG_USE_ONENAND_BOARD_INIT
#define CONFIG_SAMSUNG_ONENAND 1
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 5a80958739d..da6ed975c36 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -53,8 +53,6 @@
#define CONFIG_BOOTBLOCK "10"
#define CONFIG_UBIBLOCK "9"
-#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
-
#define CONFIG_ENV_UBIFS_OPTION " rootflags=bulk_read,no_chk_data_crc "
#define CONFIG_ENV_FLASHBOOT CONFIG_ENV_UBI_MTD CONFIG_ENV_UBIFS_OPTION \
"${mtdparts}"
diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h
index 84c6ca95eaf..240df9c63b9 100644
--- a/include/configs/salvator-x.h
+++ b/include/configs/salvator-x.h
@@ -18,7 +18,5 @@
#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
#endif /* __SALVATOR_X_H */
diff --git a/include/configs/sc_sps_1.h b/include/configs/sc_sps_1.h
index 3484bfebf2e..6011fb7d522 100644
--- a/include/configs/sc_sps_1.h
+++ b/include/configs/sc_sps_1.h
@@ -21,9 +21,6 @@
/* Environment */
/* Environment is in MMC */
-#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* FEC Ethernet on SoC */
#ifdef CONFIG_CMD_NET
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
index 857e2e349e2..5b5aa1b2f20 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -27,8 +27,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_SEABOARD
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* NAND support */
#define CONFIG_TEGRA_NAND
diff --git a/include/configs/secomx6quq7.h b/include/configs/secomx6quq7.h
index 45acf95a5b8..bd3c3402c48 100644
--- a/include/configs/secomx6quq7.h
+++ b/include/configs/secomx6quq7.h
@@ -75,7 +75,6 @@
/* Environment organization */
#if defined(CONFIG_ENV_IS_IN_MMC)
- #define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_DYNAMIC_MMC_DEVNO
#endif
diff --git a/include/configs/sheep_rk3368.h b/include/configs/sheep_rk3368.h
index 550597c957d..08cc4bf356d 100644
--- a/include/configs/sheep_rk3368.h
+++ b/include/configs/sheep_rk3368.h
@@ -8,7 +8,6 @@
#include <configs/rk3368_common.h>
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define KERNEL_LOAD_ADDR 0x280000
#define DTB_LOAD_ADDR 0x5600000
#define INITRD_LOAD_ADDR 0x5bf0000
diff --git a/include/configs/sksimx6.h b/include/configs/sksimx6.h
index 33ec049cf22..511b1a440e8 100644
--- a/include/configs/sksimx6.h
+++ b/include/configs/sksimx6.h
@@ -52,7 +52,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 1
/* Environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* Default environment */
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index 0df5ef9628f..b970e4bc80e 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -59,7 +59,6 @@
/* MIU (Memory Interleaving Unit) */
#define CONFIG_MIU_2BIT_INTERLEAVED
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define RESERVE_BLOCK_SIZE (512)
#define BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index fe68e4392e2..3d71759da4b 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -159,9 +159,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
*/
/* Environment for SDMMC boot */
-#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* device 0 */
-#endif
/* Environment for QSPI boot */
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 3e6c7267108..fb5e2e8aafa 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -49,7 +49,6 @@
/*
* U-Boot environment configurations
*/
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* device 0 */
/*
* QSPI support
diff --git a/include/configs/somlabs_visionsom_6ull.h b/include/configs/somlabs_visionsom_6ull.h
index 099c069a9f6..204818b8eb7 100644
--- a/include/configs/somlabs_visionsom_6ull.h
+++ b/include/configs/somlabs_visionsom_6ull.h
@@ -87,8 +87,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
/* USB Configs */
#ifdef CONFIG_CMD_USB
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 5d7544b5cd4..a6a4879523a 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -136,10 +136,8 @@
#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
/* If we have two devices (most likely eMMC + MMC), favour the eMMC */
-#define CONFIG_SYS_MMC_ENV_DEV 1
#else
/* Otherwise, use the only device we have */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
#define CONFIG_SYS_MMC_MAX_DEVICE 4
#endif
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index f4c6bdd1462..8092b9edfbc 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -65,10 +65,6 @@
#endif /* CONFIG_CMD_USB_MASS_STORAGE */
#endif /* CONFIG_CMD_USB */
-/* Environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 2 /* overwritten on SD boot */
-#define CONFIG_SYS_MMC_ENV_PART 1 /* overwritten on SD boot */
-
#define CONFIG_BOARD_SIZE_LIMIT 392192 /* (CONFIG_ENV_OFFSET - 1024) */
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/tec-ng.h b/include/configs/tec-ng.h
index 1047372105e..2bc531c463e 100644
--- a/include/configs/tec-ng.h
+++ b/include/configs/tec-ng.h
@@ -17,8 +17,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_TEGRA_SLINK_CTRLS 6
diff --git a/include/configs/tinker_rk3288.h b/include/configs/tinker_rk3288.h
index d239e3beb1c..269ec529a34 100644
--- a/include/configs/tinker_rk3288.h
+++ b/include/configs/tinker_rk3288.h
@@ -22,6 +22,4 @@
func(PXE, pxe, na) \
func(DHCP, dchp, na)
-#define CONFIG_SYS_MMC_ENV_DEV 1
-
#endif
diff --git a/include/configs/titanium.h b/include/configs/titanium.h
index 9100d3b14a0..7678f69dede 100644
--- a/include/configs/titanium.h
+++ b/include/configs/titanium.h
@@ -145,7 +145,6 @@
#else /* CONFIG_CMD_NAND */
/* Environment in MMC */
-#define CONFIG_SYS_MMC_ENV_DEV 0
#endif /* CONFIG_CMD_NAND */
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 13ab1cc4bf5..b58c475c224 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -74,8 +74,6 @@
#define TQMA6_UBOOT_SECTOR_START 0x2
#define TQMA6_UBOOT_SECTOR_COUNT 0x7fe
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define TQMA6_FDT_OFFSET (2 * SZ_1M)
#define TQMA6_FDT_SECTOR_START 0x1000
#define TQMA6_FDT_SECTOR_COUNT 0x800
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 75b1989bb74..3202627a7db 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -46,8 +46,6 @@
#define CONFIG_BOOTBLOCK "10"
#define CONFIG_ENV_COMMON_BOOT "${console} ${meminfo}"
-#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
-
/* Tizen - partitions definitions */
#define PARTS_CSA "csa-mmc"
#define PARTS_BOOT "boot"
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index b2e01701876..14549dd1a0c 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -41,8 +41,6 @@
#define CONFIG_SYS_MONITOR_BASE 0x00000000
-#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
-
/* Tizen - partitions definitions */
#define PARTS_CSA "csa-mmc"
#define PARTS_BOOT "boot"
diff --git a/include/configs/ts4600.h b/include/configs/ts4600.h
index 6aab8a06a96..ae9352f5b9a 100644
--- a/include/configs/ts4600.h
+++ b/include/configs/ts4600.h
@@ -23,9 +23,6 @@
/* Environment */
/* Environment is in MMC */
-#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
/* Boot Linux */
#define CONFIG_LOADADDR 0x42000000
diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h
index f321c152035..f0630a7b92d 100644
--- a/include/configs/ts4800.h
+++ b/include/configs/ts4800.h
@@ -130,6 +130,4 @@
* Environment organization
*/
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 706efb20354..b4fbf8c6383 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -85,6 +85,4 @@
/* Environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif /* __CONFIG_H * */
diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index 4e95788b24f..34a95a0283f 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -22,7 +22,6 @@
/* Command definition */
#define CONFIG_MXC_UART_BASE UART1_BASE
-#define CONFIG_SYS_MMC_ENV_DEV 0 /*USDHC2*/
/* Linux only */
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/ulcb.h b/include/configs/ulcb.h
index e006ad280b4..15fb6272287 100644
--- a/include/configs/ulcb.h
+++ b/include/configs/ulcb.h
@@ -18,7 +18,5 @@
#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#define CONFIG_SYS_MMC_ENV_PART 2
#endif /* __ULCB_H */
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index d0841a7d55f..740249a74f3 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -50,9 +50,6 @@
/* Boot Argument Buffer Size */
#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 1
-
#if !defined(CONFIG_ARM64)
/* Time clock 1MHz */
#define CONFIG_SYS_TIMER_RATE 1000000
diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h
index 0c0f85097b2..27053c067fc 100644
--- a/include/configs/usbarmory.h
+++ b/include/configs/usbarmory.h
@@ -15,7 +15,6 @@
#include <asm/arch/imx-regs.h>
/* U-Boot environment */
-#define CONFIG_SYS_MMC_ENV_DEV 0
/* U-Boot general configurations */
#define CONFIG_SYS_CBSIZE 512
diff --git a/include/configs/venice2.h b/include/configs/venice2.h
index b62a43054a2..fe861a6f7b8 100644
--- a/include/configs/venice2.h
+++ b/include/configs/venice2.h
@@ -19,8 +19,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
/* SPI */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
diff --git a/include/configs/ventana.h b/include/configs/ventana.h
index 2c2d66cdc09..21f90f38fc9 100644
--- a/include/configs/ventana.h
+++ b/include/configs/ventana.h
@@ -20,8 +20,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_VENTANA
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 2
#include "tegra-common-post.h"
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h
index 25fa7937df8..fd8405433dd 100644
--- a/include/configs/verdin-imx8mm.h
+++ b/include/configs/verdin-imx8mm.h
@@ -84,8 +84,6 @@
#if defined(CONFIG_ENV_IS_IN_MMC)
/* Environment in eMMC, before config block at the end of 1st "boot sector" */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 eMMC */
-#define CONFIG_SYS_MMC_ENV_PART 1
#endif
/* Size of malloc() pool */
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 20a03cff63c..fd4c749d96b 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -173,10 +173,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
-
#ifdef CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_RANGE (512 * 1024)
#endif
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index c4db6f4b3c1..a851fb41a81 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -78,9 +78,7 @@
#define CONFIG_IMX6_PWM_PER_CLK 66000000
#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC4 eMMC */
/* 0=user, 1=boot0, 2=boot1, * 4..7=general0..3. */
-#define CONFIG_SYS_MMC_ENV_PART 1 /* boot0 */
#endif
#ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/vyasa-rk3288.h b/include/configs/vyasa-rk3288.h
index 4d8b4a03e1a..3dc10b29c3f 100644
--- a/include/configs/vyasa-rk3288.h
+++ b/include/configs/vyasa-rk3288.h
@@ -20,8 +20,6 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
-#define CONFIG_SYS_MMC_ENV_DEV 1
-
#ifndef CONFIG_TPL_BUILD
#define CONFIG_SPL_OS_BOOT
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index c798ca64bf1..df13e3da537 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -122,6 +122,4 @@
/* Environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#endif /* __CONFIG_H * */
diff --git a/include/configs/warp.h b/include/configs/warp.h
index 1ab72cd00bc..f17eea117f3 100644
--- a/include/configs/warp.h
+++ b/include/configs/warp.h
@@ -37,8 +37,6 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
/* VDD voltage 1.65 - 1.95 */
#define CONFIG_SYS_SD_VOLTAGE 0x00000080
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 60a902b2c74..2d1ede3bc8d 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -143,9 +143,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 1
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART 0
-
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/xpress.h b/include/configs/xpress.h
index 79364d3437f..399925a75bd 100644
--- a/include/configs/xpress.h
+++ b/include/configs/xpress.h
@@ -48,8 +48,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* Environment is in stored in the eMMC boot partition */
-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC2 */
-#define CONFIG_SYS_MMC_ENV_PART 1 /* boot parition */
#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC2 */
/* USB Configs */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 82f8f12e20b..e2db424fd5e 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2985,8 +2985,6 @@ CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
CONFIG_SYS_MMC_BASE
CONFIG_SYS_MMC_CD_PIN
CONFIG_SYS_MMC_CLK_OD
-CONFIG_SYS_MMC_ENV_DEV
-CONFIG_SYS_MMC_ENV_PART
CONFIG_SYS_MMC_MAX_BLK_COUNT
CONFIG_SYS_MMC_MAX_DEVICE
CONFIG_SYS_MMC_U_BOOT_DST