env: Rename SYS_MMC_ENV_DEV to ENV_MMC_DEVICE_INDEX

Rename the variable and add ENV_ prefix, so that all configuration
options which are related to environment would have an CONFIG_ENV_
prefix. No functional change.

Use ENV_MMC_DEVICE_INDEX to clarify this is the SD/MMC device
index, a number, as enumerated by U-Boot. Update the help text
accordingly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
diff --git a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20-a1.env b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20-a1.env
index 0c9f9c4..90861e6 100644
--- a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20-a1.env
+++ b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20-a1.env
@@ -6,7 +6,7 @@
 fdt_addr=0x83000000
 boot_fdt=try
 fdt_file=imx8qm-dmsse20-a1.dtb
-mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV)
+mmcdev= __stringify(CONFIG_ENV_MMC_DEVICE_INDEX)
 mmcpart= __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART)
 mmcroot=/dev/mmcblk1p2 rootwait rw
 mmcautodetect=yes
diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.env b/board/freescale/imx8mm_evk/imx8mm_evk.env
index 29690e7..299b847 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.env
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.env
@@ -14,7 +14,7 @@
 kernel_addr_r=0x42000000
 loadaddr=CONFIG_SYS_LOAD_ADDR
 mmcautodetect=yes
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 prepare_mcore=setenv mcore_clk clk-imx8mm.mcore_booted;
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.env b/board/freescale/imx8mn_evk/imx8mn_evk.env
index 16a6543..487893f 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.env
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.env
@@ -14,7 +14,7 @@
 kernel_addr_r=0x42000000
 loadaddr=CONFIG_SYS_LOAD_ADDR
 mmcautodetect=yes
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 prepare_mcore=setenv mcore_clk clk-imx8mn.mcore_booted;
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.env b/board/freescale/imx8mp_evk/imx8mp_evk.env
index f70e18f..18cdf3d 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.env
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.env
@@ -10,7 +10,7 @@
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 image=Image
 ip_dyn=yes
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 mmcautodetect=yes
diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.env b/board/freescale/imx8mq_evk/imx8mq_evk.env
index dcfe1c2..cab8c6b 100644
--- a/board/freescale/imx8mq_evk/imx8mq_evk.env
+++ b/board/freescale/imx8mq_evk/imx8mq_evk.env
@@ -12,7 +12,7 @@
 kernel_addr_r=CONFIG_SYS_LOAD_ADDR
 loadaddr=CONFIG_SYS_LOAD_ADDR
 mmcautodetect=yes
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 prepare_mcore=setenv mcore_clk clk-imx8mq.mcore_booted;
diff --git a/board/freescale/imx91_evk/imx91_evk.env b/board/freescale/imx91_evk/imx91_evk.env
index c972d3e..6c10784 100644
--- a/board/freescale/imx91_evk/imx91_evk.env
+++ b/board/freescale/imx91_evk/imx91_evk.env
@@ -10,7 +10,7 @@
 fdt_addr=0x83000000
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 image=Image
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 mmcautodetect=yes
diff --git a/board/freescale/imx93_evk/imx93_evk.env b/board/freescale/imx93_evk/imx93_evk.env
index 8c3aef6..d5ed216 100644
--- a/board/freescale/imx93_evk/imx93_evk.env
+++ b/board/freescale/imx93_evk/imx93_evk.env
@@ -10,7 +10,7 @@
 fdt_addr=0x83000000
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 image=Image
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 mmcautodetect=yes
diff --git a/board/freescale/imx93_qsb/imx93_qsb.env b/board/freescale/imx93_qsb/imx93_qsb.env
index c972d3e..6c10784 100644
--- a/board/freescale/imx93_qsb/imx93_qsb.env
+++ b/board/freescale/imx93_qsb/imx93_qsb.env
@@ -10,7 +10,7 @@
 fdt_addr=0x83000000
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 image=Image
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=/dev/mmcblk1p2 rootwait rw
 mmcautodetect=yes
diff --git a/board/freescale/imx95_evk/imx95_19x19_evk.env b/board/freescale/imx95_evk/imx95_19x19_evk.env
index a002767..a7309d7 100644
--- a/board/freescale/imx95_evk/imx95_19x19_evk.env
+++ b/board/freescale/imx95_evk/imx95_19x19_evk.env
@@ -14,7 +14,7 @@
 boot_fit=no
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 bootm_size=0x10000000
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcautodetect=yes
 mmcargs=setenv bootargs console=${console} root=${mmcroot}
 loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c
index c2a44b4..492d1dc 100644
--- a/board/grinn/liteboard/board.c
+++ b/board/grinn/liteboard/board.c
@@ -84,7 +84,7 @@
 
 	/* If not boot from sd/mmc, use default value */
 	if (bootsel != 1)
-		return CONFIG_SYS_MMC_ENV_DEV;
+		return CONFIG_ENV_MMC_DEVICE_INDEX;
 
 	/* BOOT_CFG2[3] and BOOT_CFG2[4] */
 	dev_no = (soc_sbmr & 0x00001800) >> 11;
diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c
index d9aec16..7f34d71 100644
--- a/board/phytec/common/k3/board.c
+++ b/board/phytec/common/k3/board.c
@@ -94,7 +94,7 @@
 		return 1;
 	};
 
-	return CONFIG_SYS_MMC_ENV_DEV;
+	return CONFIG_ENV_MMC_DEVICE_INDEX;
 }
 #endif
 
diff --git a/board/phytec/phycore_imx8mm/phycore_imx8mm.env b/board/phytec/phycore_imx8mm/phycore_imx8mm.env
index a7d14e7..402d967 100644
--- a/board/phytec/phycore_imx8mm/phycore_imx8mm.env
+++ b/board/phytec/phycore_imx8mm/phycore_imx8mm.env
@@ -34,7 +34,7 @@
 			echo WARN: Cannot load the DT;
 		fi;
 	fi;
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=2
 netargs=
diff --git a/board/phytec/phycore_imx8mp/phycore_imx8mp.env b/board/phytec/phycore_imx8mp/phycore_imx8mp.env
index 2c12fc6..69690aa 100644
--- a/board/phytec/phycore_imx8mp/phycore_imx8mp.env
+++ b/board/phytec/phycore_imx8mp/phycore_imx8mp.env
@@ -51,7 +51,7 @@
 	else
 		echo WARN: Cannot load the DT;
 	fi;
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=2
 netargs=
diff --git a/board/phytec/phycore_imx93/phycore_imx93.env b/board/phytec/phycore_imx93/phycore_imx93.env
index 3b2f301..7b0a90e 100644
--- a/board/phytec/phycore_imx93/phycore_imx93.env
+++ b/board/phytec/phycore_imx93/phycore_imx93.env
@@ -23,7 +23,7 @@
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 ip_dyn=yes
 prepare_mcore=setenv optargs "${optargs} clk-imx93.mcore_booted"
-mmcdev=CONFIG_SYS_MMC_ENV_DEV
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
 mmcpart=1
 mmcroot=2
 mmcautodetect=yes
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 15fb9e4..ab7af69 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -828,7 +828,7 @@
 
 int mmc_get_env_dev(void)
 {
-	const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_SYS_MMC_ENV_DEV), (-1));
+	const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_ENV_MMC_DEVICE_INDEX), (-1));
 
 	if (mmc_env_dev >= 0)
 		return mmc_env_dev;
diff --git a/board/st/stm32mp2/stm32mp2.c b/board/st/stm32mp2/stm32mp2.c
index 2547f2e..a72056e 100644
--- a/board/st/stm32mp2/stm32mp2.c
+++ b/board/st/stm32mp2/stm32mp2.c
@@ -183,7 +183,7 @@
 
 int mmc_get_env_dev(void)
 {
-	const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_SYS_MMC_ENV_DEV), (-1));
+	const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_ENV_MMC_DEVICE_INDEX), (-1));
 
 	if (mmc_env_dev >= 0)
 		return mmc_env_dev;
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index ac9cefc..feec956 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -516,7 +516,7 @@
 	return 0;
 }
 
-#ifdef CONFIG_SYS_MMC_ENV_DEV
+#ifdef CONFIG_ENV_MMC_DEVICE_INDEX
 int mmc_get_env_dev(void)
 {
 	switch (sunxi_get_boot_device()) {
@@ -525,7 +525,7 @@
 	case BOOT_DEVICE_MMC2:
 		return 1;
 	default:
-		return CONFIG_SYS_MMC_ENV_DEV;
+		return CONFIG_ENV_MMC_DEVICE_INDEX;
 	}
 }
 #endif