From 340b0e3bb6e8808a7e683e030b3c5b5137715041 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 30 May 2016 16:06:54 +0200 Subject: [PATCH] env: Setup GD_FLG_ENV_DEFAULT flag when default environment are used Setup flag when default environment are used to be able to rewrite default distro boot variables based on SoC boot mode. Signed-off-by: Michal Simek Reviewed-by: Alexander Graf --- common/env_common.c | 1 + include/asm-generic/global_data.h | 1 + 2 files changed, 2 insertions(+) diff --git a/common/env_common.c b/common/env_common.c index af59c72e1f..13db7dc3f7 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -123,6 +123,7 @@ void set_default_env(const char *s) error("Environment import failed: errno = %d\n", errno); gd->flags |= GD_FLG_ENV_READY; + gd->flags |= GD_FLG_ENV_DEFAULT; } diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index f2810a1bd7..0abcbe4c0b 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -141,5 +141,6 @@ typedef struct global_data { #define GD_FLG_SPL_INIT 0x00400 /* spl_init() has been called */ #define GD_FLG_SKIP_RELOC 0x00800 /* Don't relocate */ #define GD_FLG_RECORD 0x01000 /* Record console */ +#define GD_FLG_ENV_DEFAULT 0x02000 /* Default variable flag */ #endif /* __ASM_GENERIC_GBL_DATA_H */ -- 2.25.1