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/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c
index b431401..f0cc34d 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 @@
 #endif
 
 	gd->env_addr  = (ulong)(CONFIG_ENV_ADDR);
-	gd->env_valid = 1;
+	gd->env_valid = ENV_VALID;
 
 	i2c_init_all();