env: Move env_init() to env.h
authorSimon Glass <sjg@chromium.org>
Thu, 1 Aug 2019 15:46:43 +0000 (09:46 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 11 Aug 2019 20:43:41 +0000 (16:43 -0400)
Move env_init() over to the new header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
19 files changed:
arch/arm/cpu/armv8/fsl-layerscape/spl.c
arch/mips/lib/bootm.c
board/Arcturus/ucp1020/spl.c
board/birdland/bav335x/board.c
board/freescale/b4860qds/spl.c
board/freescale/p1010rdb/spl.c
board/freescale/p1022ds/spl.c
board/freescale/p1_p2_rdb_pc/spl.c
board/gateworks/gw_ventana/gw_ventana_spl.c
board/liebherr/display5/spl.c
board/tcl/sl50/board.c
board/ti/am335x/board.c
board/ti/am57xx/board.c
board/ti/dra7xx/evm.c
common/board_f.c
common/spl/spl_net.c
env/env.c
include/common.h
include/env.h

index 3e53084..8eeeef1 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <fsl_ifc.h>
index 6a462f3..8c0d767 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <image.h>
 #include <fdt_support.h>
 #include <asm/addrspace.h>
index 451a9d7..f3b7d99 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <env.h>
 #include <environment.h>
 #include <ns16550.h>
 #include <malloc.h>
index b951860..b0339ad 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
index 887fa04..d9aa57f 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <env.h>
 #include <environment.h>
 #include <asm/spl.h>
 #include <malloc.h>
index e07640a..95f8b58 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <env.h>
 #include <environment.h>
 #include <ns16550.h>
 #include <malloc.h>
index cfdd9fc..92fd199 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <env.h>
 #include <environment.h>
 #include <ns16550.h>
 #include <malloc.h>
index 48ab271..9d7b5ef 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <env.h>
 #include <environment.h>
 #include <ns16550.h>
 #include <malloc.h>
index eaf7aa9..740fc57 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <env.h>
 #include <environment.h>
 #include <i2c.h>
 #include <spl.h>
index 27f843e..d92760b 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <spl.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
index 6bb6482..8ddbee5 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
index 2c32b92..58d09f7 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <spl.h>
 #include <serial.h>
index 1a903f1..0dacfd4 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <palmas.h>
 #include <sata.h>
 #include <usb.h>
index 179adc2..97eef65 100644 (file)
@@ -10,6 +10,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <env.h>
 #include <palmas.h>
 #include <sata.h>
 #include <linux/string.h>
index 7d656fa..18937bf 100644 (file)
@@ -14,6 +14,7 @@
 #include <console.h>
 #include <cpu.h>
 #include <dm.h>
+#include <env.h>
 #include <environment.h>
 #include <fdtdec.h>
 #include <fs.h>
index c91ad2b..8033032 100644 (file)
@@ -7,6 +7,7 @@
  * Ilya Yanok <ilya.yanok@gmail.com>
  */
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <spl.h>
 #include <net.h>
index d3cbe2f..9d421e8 100644 (file)
--- a/env/env.c
+++ b/env/env.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <environment.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 2aabd26..55cbe1f 100644 (file)
@@ -146,7 +146,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
 int do_ext2load(cmd_tbl_t *, int, int, char * const []);
 
 /* common/cmd_nvedit.c */
-int    env_init     (void);
 void   env_relocate (void);
 int    envmatch     (uchar *, int);
 
index 19b559a..5d205ef 100644 (file)
  */
 int env_get_id(void);
 
+/**
+ * env_init() - Set up the pre-relocation environment
+ *
+ * This locates the environment or uses the default if nothing is available.
+ * This must be called before env_get() will work.
+ *
+ * @return 0 if OK, -ENODEV if no environment drivers are enabled
+ */
+int env_init(void);
+
 /**
  * env_get_f() - Look up the value of an environment variable (early)
  *