diff options
| author | Rajesh Bhagat <rajesh.bhagat@nxp.com> | 2018-11-05 18:01:10 +0000 | 
|---|---|---|
| committer | York Sun <york.sun@nxp.com> | 2018-12-04 13:07:13 -0800 | 
| commit | b6cba297affba968a8d8465655c71cb3ec8a9bde (patch) | |
| tree | 7c25dbcfd59cd82f3099f76ebdcb704f9c58d8d7 /env/flash.c | |
| parent | d171c70716d49f0e14eb357ab645c8e72b791ca1 (diff) | |
env: allow flash and nand env driver to compile together
Define env_ptr as static in flash and nand env driver to
allow these to compile together.
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'env/flash.c')
| -rw-r--r-- | env/flash.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/env/flash.c b/env/flash.c index 32236c716ec..dca6567a097 100644 --- a/env/flash.c +++ b/env/flash.c @@ -44,16 +44,16 @@ DECLARE_GLOBAL_DATA_PTR;  #define INITENV  #endif +#if defined(CONFIG_ENV_ADDR_REDUND) && defined(CMD_SAVEENV) || \ +	!defined(CONFIG_ENV_ADDR_REDUND) && defined(INITENV)  #ifdef ENV_IS_EMBEDDED -env_t *env_ptr = &environment; - -static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR; - +static env_t *env_ptr = &environment;  #else /* ! ENV_IS_EMBEDDED */ -env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; -static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR; +static env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;  #endif /* ENV_IS_EMBEDDED */ +#endif +static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;  /* CONFIG_ENV_ADDR is supposed to be on sector boundary */  static ulong __maybe_unused end_addr = | 
