diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:21:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-15 08:18:51 -0400 |
commit | 203e94f6c9ca03e260175ce240f5856507395585 (patch) | |
tree | 1b13b0ff87c4117e18e6ee7db97e09c541724b69 /board/freescale | |
parent | 75de597d2d91b1102584d4b641daf592d894207e (diff) | |
download | u-boot-203e94f6c9ca03e260175ce240f5856507395585.tar.gz |
env: Add an enum for environment state
At present we have three states for the environment, numbered 0, 1 and 2.
Add an enum to record this to avoid open-coded values.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/b4860qds/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/c29xpcie/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/p1010rdb/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/p1022ds/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/p1_p2_rdb_pc/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t102xqds/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t102xrdb/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t104xrdb/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t208xqds/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t208xrdb/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t4qds/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t4rdb/spl.c | 3 |
12 files changed, 24 insertions, 12 deletions
diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c index 60d7f0d48a..b1824b07a2 100644 --- a/board/freescale/b4860qds/spl.c +++ b/board/freescale/b4860qds/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <asm/spl.h> #include <malloc.h> #include <ns16550.h> @@ -101,7 +102,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, (uchar *)CONFIG_ENV_ADDR); gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; #endif i2c_init_all(); diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c index 94093f11a8..28541a72cb 100644 --- a/board/freescale/c29xpcie/spl.c +++ b/board/freescale/c29xpcie/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <ns16550.h> #include <malloc.h> #include <mmc.h> @@ -63,7 +64,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, (uchar *)CONFIG_ENV_ADDR); gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index 2cebc2c002..001308874e 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <ns16550.h> #include <malloc.h> #include <mmc.h> @@ -87,7 +88,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, (uchar *)CONFIG_ENV_ADDR); gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; #else env_relocate(); #endif diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index a117dc3a2c..94b357d446 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -6,6 +6,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <ns16550.h> #include <malloc.h> #include <mmc.h> @@ -100,7 +101,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; #else env_relocate(); #endif diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index ca7ba5754e..c1d4c36b06 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -6,6 +6,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <ns16550.h> #include <malloc.h> #include <mmc.h> @@ -92,7 +93,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, (uchar *)CONFIG_ENV_ADDR); gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; #else env_relocate(); #endif diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c index b987ecea1d..3aa19e6715 100644 --- a/board/freescale/t102xqds/spl.c +++ b/board/freescale/t102xqds/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <malloc.h> #include <ns16550.h> #include <nand.h> @@ -138,7 +139,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index dc6d9eeef6..ca1e49ffa7 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <malloc.h> #include <ns16550.h> #include <nand.h> @@ -125,7 +126,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index 2e43307b2d..4fb9323873 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <malloc.h> #include <ns16550.h> #include <nand.h> @@ -119,7 +120,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index d7d716b690..36961dc9b0 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <malloc.h> #include <ns16550.h> #include <nand.h> @@ -124,7 +125,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index b43140148b..f0cc34d788 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <malloc.h> #include <ns16550.h> #include <nand.h> @@ -94,7 +95,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c index 9ecdaedda3..750f155493 100644 --- a/board/freescale/t4qds/spl.c +++ b/board/freescale/t4qds/spl.c @@ -5,6 +5,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <asm/spl.h> #include <malloc.h> #include <ns16550.h> @@ -129,7 +130,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index 5feab1cfcd..932954e93d 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -8,6 +8,7 @@ #include <common.h> #include <console.h> +#include <environment.h> #include <asm/spl.h> #include <malloc.h> #include <ns16550.h> @@ -87,7 +88,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); gd->env_addr = (ulong)(CONFIG_ENV_ADDR); - gd->env_valid = 1; + gd->env_valid = ENV_VALID; i2c_init_all(); |