env: Move env_get() to env.h

Move env_get() over to the new header file.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 3189495..d2b67b1 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <malloc.h>
 #include <mmc.h>
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 17eca73..e76af8e 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <fastboot.h>
 #include <net/fastboot.h>
 
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index ebe5c8a..95cb434 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <fastboot.h>
 #include <fastboot-internal.h>
 #include <fb_mmc.h>
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 0a335db..b0b19c5 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -6,6 +6,7 @@
 #include <config.h>
 #include <common.h>
 #include <blk.h>
+#include <env.h>
 #include <fastboot.h>
 #include <fastboot-internal.h>
 #include <fb_mmc.h>
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 9a5dc46..9801589 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <i8042.h>
 #include <input.h>
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 4f514db..6ab378b 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <stdio_dev.h>
 #include <input.h>
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index f42eeff..88e486e 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <blk.h>
 #include <fs.h>
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index e3c403c..43c2253 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <env.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c
index 6125797..72d1294 100644
--- a/drivers/net/fm/fdt.c
+++ b/drivers/net/fm/fdt.c
@@ -3,6 +3,7 @@
  * Copyright 2016 Freescale Semiconductor, Inc.
  */
 #include <asm/io.h>
+#include <env.h>
 #include <fsl_qe.h>	/* For struct qe_firmware */
 
 #ifdef CONFIG_SYS_DPAA_FMAN
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index cc59b21..1d96e4b 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -5,6 +5,7 @@
  * Copyright 2017-2018 NXP
  */
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <linux/bug.h>
 #include <asm/io.h>
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 88309b1..41752c0 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <environment.h>
 #include <malloc.h>
 #include <command.h>
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index c08889c..d8f1dde 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <env.h>
 #include <malloc.h>
 #include <net.h>
 #include <linux/io.h>
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 2b54e3a..a8553cb 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <environment.h>
 #include <malloc.h>
 
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index f18e40a..0105fc5 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <micrel.h>
 #include <phy.h>
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 2d5c970..e2ca474 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -10,6 +10,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <env.h>
 #include <environment.h>
 #include <malloc.h>
 #include <net.h>
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index b4c8556..ab5e499 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <malloc.h>
 #include <asm/fsl_serdes.h>
 
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e219572..5db24f1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -17,6 +17,7 @@
 #include <common.h>
 
 #include <command.h>
+#include <env.h>
 #include <errno.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c
index 9f2d267..5231b69 100644
--- a/drivers/pci/pci_common.c
+++ b/drivers/pci/pci_common.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 822a3fe..93ec9cf 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <dm/lists.h>
 #include <dm/of_access.h>
+#include <env.h>
 #include <reset-uclass.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index c84c8e1..532d210 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index d0465b8..76d9c8a 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <config.h>
 #include <circbuf.h>
+#include <env.h>
 #include <stdio_dev.h>
 #include <asm/unaligned.h>
 #include "usbtty.h"
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index fa947da..432f312 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <asm/io.h>
 
+#include <env.h>
 #include <usbdevice.h>
 #include "ep0.h"
 #include <usb/designware_udc.h>
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index e27f146..6756155 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -14,6 +14,7 @@
  * (C) Copyright 2006 by Harald Welte <hwelte at hmw-consulting.de>
  */
 
+#include <env.h>
 #include <errno.h>
 #include <common.h>
 #include <malloc.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 3ad4346..fc27dbe 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -11,6 +11,7 @@
  */
 #include <config.h>
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <fastboot.h>
 #include <malloc.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index f3d2477..1cfeabc 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -6,6 +6,7 @@
  */
 #include <config.h>
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index b8f8e7a..ced295e 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <pci.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c
index 87557e5..6fce033 100644
--- a/drivers/video/ati_radeon_fb.c
+++ b/drivers/video/ati_radeon_fb.c
@@ -19,6 +19,7 @@
 
 #include <command.h>
 #include <bios_emul.h>
+#include <env.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <linux/errno.h>
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index ac02921..e5c077e 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -65,6 +65,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <fdtdec.h>
 #include <gzip.h>
 #include <version.h>
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index 1a3c970..301c1f0 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -12,6 +12,7 @@
 #include <common.h>
 
 #include <asm/io.h>
+#include <env.h>
 #include <pci.h>
 #include <video_fb.h>
 #include "videomodes.h"
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 176ae70..a984443 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -6,6 +6,7 @@
  * HALE electronic GmbH, <helmut.raiger@hale.at>
  */
 #include <common.h>
+#include <env.h>
 #include <malloc.h>
 #include <video_fb.h>
 
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 6c9a7c0..6922a13 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <linux/errno.h>
 #include <malloc.h>
 #include <video.h>
diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c
index d761432..ac25b45 100644
--- a/drivers/video/videomodes.c
+++ b/drivers/video/videomodes.c
@@ -58,6 +58,7 @@
 
 #include <common.h>
 #include <edid.h>
+#include <env.h>
 #include <errno.h>
 #include <linux/ctype.h>