env: Convert CONFIG_DELAY_ENVIRONMENT to Kconfig

This converts ad-hoc CONFIG_DELAY_ENVIRONMENT to Kconfig.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
diff --git a/env/Kconfig b/env/Kconfig
index af63ac5..ed94e83 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -592,6 +592,18 @@
 	  run-time determined information about the hardware to the
 	  environment.  These will be named board_name, board_rev.
 
+config DELAY_ENVIRONMENT
+	bool "Delay environment loading"
+	depends on !OF_CONTROL
+	help
+	  Enable this to inhibit loading the environment during board
+	  initialization. This can address the security risk of untrusted data
+	  being used during boot. Normally the environment is loaded when the
+	  board is initialised so that it is available to U-Boot. This inhibits
+	  that so that the environment is not available until explicitly loaded
+	  later by U-Boot code. With CONFIG_OF_CONTROL this is instead
+	  controlled by the value of /config/load-environment.
+
 if SPL_ENV_SUPPORT
 config SPL_ENV_IS_NOWHERE
 	bool "SPL Environment is not stored"