summaryrefslogtreecommitdiff
path: root/env/common.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-24 08:13:27 -0400
committerTom Rini <trini@konsulko.com>2019-05-24 08:13:27 -0400
commit866a78dc28411f4c76ba887f439f69f1116d8a6b (patch)
treee9e7f1255f290783c4f748983debbf832495764e /env/common.c
parentafe9e1f197e6d0ee4fa59d56639ca56d5f2ed566 (diff)
parent187c41d783371dc3b7ecae45f450b330f5e1bb25 (diff)
Merge tag 'u-boot-stm32-20190523' of https://github.com/pchotard/u-boot
- Add various STM32MP1 fixes for serial, env, clk, board, i2c ... - Add STM32MP1 DDR driver update: These update introduce the DDR interactive mode described in: https://wiki.st.com/stm32mpu/index.php/U-Boot_SPL:_DDR_interactive_mode This mode is used by the CubeMX: DDR tuning tool. https://wiki.st.com/stm32mpu/index.php/STM32CubeMX The DDR interactive mode is NOT activated by default because it increase the SPL size and slow down the boot time (200ms wait added).
Diffstat (limited to 'env/common.c')
-rw-r--r--env/common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/env/common.c b/env/common.c
index 324502ed82..bd340fe9d5 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)