From 7d080773347c1f6e0e896d9284134a2a411155d6 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 24 Jul 2020 17:14:47 -0400 Subject: 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 --- env/Kconfig | 19 +++++++++++++++++++ env/mmc.c | 4 ---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'env') 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; -- cgit