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>
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index cd484fc..b5e7a5d 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <console.h>
+#include <environment.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
@@ -99,7 +100,7 @@
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