summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-24 17:14:47 -0400
committerTom Rini <trini@konsulko.com>2020-08-08 11:03:52 -0400
commit7d080773347c1f6e0e896d9284134a2a411155d6 (patch)
treed1980362503baa76640290b557206aaad17fab2f /env
parentb904d79e4809bf35cf53c2e5fee0f73647bab07a (diff)
Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig
This converts the following to Kconfig: CONFIG_SYS_MMC_ENV_DEV CONFIG_SYS_MMC_ENV_PART Note that with this conversion we now have consistent behavior with respect to ensuring that we have always selected the correct MMC device and hardware partition. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env')
-rw-r--r--env/Kconfig19
-rw-r--r--env/mmc.c4
2 files changed, 19 insertions, 4 deletions
diff --git a/env/Kconfig b/env/Kconfig
index 5d0a8ecea0..af4d9cbaa4 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 af7e5fbac3..ba872701b0 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;