diff options
Diffstat (limited to 'env')
-rw-r--r-- | env/Kconfig | 6 | ||||
-rw-r--r-- | env/common.c | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/env/Kconfig b/env/Kconfig index 78300660c72..1e10c7a4c46 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -351,14 +351,14 @@ config ENV_SPI_CS Value of the SPI chip select for environment. config USE_ENV_SPI_MAX_HZ - bool "SPI flash bus for environment" + bool "SPI flash max frequency for environment" depends on ENV_IS_IN_SPI_FLASH help Force the SPI max work clock for environment. If not defined, use CONFIG_SF_DEFAULT_SPEED. config ENV_SPI_MAX_HZ - int "Value of SPI flash max work for environment" + int "Value of SPI flash max frequency for environment" depends on USE_ENV_SPI_MAX_HZ help Value of the SPI max work clock for environment. @@ -470,7 +470,7 @@ config ENV_EXT4_FILE It's a string of the EXT4 file name. This file use to store the environment (explicit path to the file) -if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARC +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARC || ARCH_STM32MP config ENV_OFFSET hex "Environment Offset" diff --git a/env/common.c b/env/common.c index 324502ed829..bd340fe9d52 100644 --- a/env/common.c +++ b/env/common.c @@ -23,7 +23,10 @@ DECLARE_GLOBAL_DATA_PTR; #include <env_default.h> struct hsearch_data env_htab = { +#if CONFIG_IS_ENABLED(ENV_SUPPORT) + /* defined in flags.c, only compile with ENV_SUPPORT */ .change_ok = env_flags_validate, +#endif }; /* @@ -225,7 +228,9 @@ void env_relocate(void) #if defined(CONFIG_NEEDS_MANUAL_RELOC) env_reloc(); env_fix_drivers(); - env_htab.change_ok += gd->reloc_off; + + if (env_htab.change_ok) + env_htab.change_ok += gd->reloc_off; #endif if (gd->env_valid == ENV_INVALID) { #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD) |