env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index 5332685..d36484c 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
@@ -7,7 +7,6 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <net.h>
 #include <linux/mtd/st_smi.h>
diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c
index b310bc7..80e9642 100644
--- a/arch/arm/mach-davinci/misc.c
+++ b/arch/arm/mach-davinci/misc.c
@@ -10,7 +10,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index 463b869..1b111ba 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -7,7 +7,6 @@
 
 #include <common.h>
 #include <command.h>
-#include <environment.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c
index 183a0c9..3ab9a3f 100644
--- a/arch/arm/mach-imx/mx6/opos6ul.c
+++ b/arch/arm/mach-imx/mx6/opos6ul.c
@@ -14,7 +14,6 @@
 #include <asm/io.h>
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index 08a7aae..0843dca 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -8,7 +8,6 @@
 #include <env.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
-#include <environment.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sm.h>
 #include <asm/armv8/mmu.h>
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index c8b8ac6..eb8c584 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <ahci.h>
-#include <environment.h>
 #include <spl.h>
 #include <asm/omap_common.h>
 #include <asm/arch/omap.h>
diff --git a/arch/arm/mach-omap2/omap3/clock.c b/arch/arm/mach-omap2/omap3/clock.c
index cb9e91e..71f7349 100644
--- a/arch/arm/mach-omap2/omap3/clock.c
+++ b/arch/arm/mach-omap2/omap3/clock.c
@@ -17,7 +17,6 @@
 #include <asm/arch/clocks_omap3.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
-#include <environment.h>
 #include <command.h>
 
 /******************************************************************************
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 5478416..0d5ca20 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -5,7 +5,6 @@
  */
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/setup.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/omap_common.h>
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index b06b84c..a46e843 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -6,7 +6,6 @@
 #include <clk.h>
 #include <debug_uart.h>
 #include <env.h>
-#include <environment.h>
 #include <misc.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index bd4f336..0433081 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <fdt_support.h>
 #include <fdtdec.h>
 #include <stdlib.h>
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index 5b7a68b..19445b3 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -11,7 +11,6 @@
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <watchdog.h>
-#include <environment.h>
 #include <asm/byteorder.h>
 #ifdef CONFIG_SHOW_BOOT_PROGRESS
 # include <status_led.h>
diff --git a/arch/nds32/include/asm/u-boot.h b/arch/nds32/include/asm/u-boot.h
index 68701d6..8c949e7 100644
--- a/arch/nds32/include/asm/u-boot.h
+++ b/arch/nds32/include/asm/u-boot.h
@@ -21,7 +21,6 @@
 
 #include <asm/u-boot-nds32.h>
 
-#include <environment.h>
 
 typedef struct bd_info {
 	unsigned long	bi_arch_number;	/* unique id for this board */
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index d17c382..db12aef 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -8,7 +8,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 52bcd4e..84691b7 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -15,7 +15,6 @@
 #include <malloc.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
-#include <environment.h>
 #include <asm/byteorder.h>
 #include <asm/mp.h>
 #include <bootm.h>
diff --git a/arch/riscv/include/asm/u-boot.h b/arch/riscv/include/asm/u-boot.h
index 3186835..5ba8e77 100644
--- a/arch/riscv/include/asm/u-boot.h
+++ b/arch/riscv/include/asm/u-boot.h
@@ -20,7 +20,6 @@
 
 #include <asm/u-boot-riscv.h>
 
-#include <environment.h>
 
 typedef struct bd_info {
 	unsigned long	bi_boot_params;	/* where this board expects params */
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c
index 755f569..2e8477e 100644
--- a/board/Arcturus/ucp1020/cmd_arc.c
+++ b/board/Arcturus/ucp1020/cmd_arc.c
@@ -15,7 +15,6 @@
 #include <spi_flash.h>
 #include <mmc.h>
 #include <version.h>
-#include <environment.h>
 #include <asm/io.h>
 
 static ulong fwenv_addr[MAX_FWENV_ADDR];
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index f3c89d6..946e20a 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -15,7 +15,6 @@
 #include <linux/string.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
-#include <environment.h>
 
 #include "mox_sp.h"
 
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index 418657c..1d8d08a 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index 1609089..686608d 100644
--- a/board/LaCie/net2big_v2/net2big_v2.c
+++ b/board/LaCie/net2big_v2/net2big_v2.c
@@ -11,7 +11,6 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index ba66793..bd7ab22 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -11,7 +11,6 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
index 7f33ce0..41d331d 100644
--- a/board/amlogic/p200/p200.c
+++ b/board/amlogic/p200/p200.c
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c
index 0a17fbe..e46fcaea 100644
--- a/board/amlogic/p201/p201.c
+++ b/board/amlogic/p201/p201.c
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c
index 4d6ac72..094ab54 100644
--- a/board/amlogic/p212/p212.c
+++ b/board/amlogic/p212/p212.c
@@ -7,7 +7,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c
index 880945f..f1faa74 100644
--- a/board/amlogic/q200/q200.c
+++ b/board/amlogic/q200/q200.c
@@ -7,7 +7,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/mem.h>
diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c
index 02a0e92..bdb4eca 100644
--- a/board/amlogic/s400/s400.c
+++ b/board/amlogic/s400/s400.c
@@ -6,7 +6,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c
index 94ee3ce..69fd29d 100644
--- a/board/amlogic/u200/u200.c
+++ b/board/amlogic/u200/u200.c
@@ -6,7 +6,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/sm.h>
diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c
index bf2586d..20be0c3 100644
--- a/board/armadeus/apf27/apf27.c
+++ b/board/armadeus/apf27/apf27.c
@@ -7,7 +7,6 @@
  */
 
 #include <common.h>
-#include <environment.h>
 #include <jffs2/jffs2.h>
 #include <nand.h>
 #include <netdev.h>
diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c
index f016ef7..83a7778 100644
--- a/board/atmel/common/mac_eeprom.c
+++ b/board/atmel/common/mac_eeprom.c
@@ -7,7 +7,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c_eeprom.h>
 #include <netdev.h>
 
diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c
index b0339ad..9e64cbb 100644
--- a/board/birdland/bav335x/board.c
+++ b/board/birdland/bav335x/board.c
@@ -30,7 +30,6 @@
 #include <power/tps65910.h>
 #include <environment.h>
 #include <watchdog.h>
-#include <environment.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 86ab180..bc3c6d2 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -12,7 +12,6 @@
 #include <cpsw.h>
 #include <dm.h>
 #include <environment.h>
-#include <environment.h>
 #include <errno.h>
 #include <i2c.h>
 #include <miiphy.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index 29be373..358118f 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -33,7 +33,6 @@
 #include <power/tps65217.h>
 #include <environment.h>
 #include <watchdog.h>
-#include <environment.h>
 #include "mmc.h"
 #include "board.h"
 
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index 6cc7554..395d5dc 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <mmc.h>
 #include <phy.h>
 #include <netdev.h>
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 57bbe41..feb7a71 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -12,7 +12,6 @@
 #include <dm.h>
 #include <dwc_ahsata.h>
 #include <env.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <miiphy.h>
 #include <mtd_node.h>
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index fca7685..6e38745 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <miiphy.h>
 #include <cpsw.h>
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index ead4700..b52358b 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -13,7 +13,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <status_led.h>
 #include <netdev.h>
 #include <net.h>
diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c
index d7c59d5..811bbb5 100644
--- a/board/compulab/cm_t54/cm_t54.c
+++ b/board/compulab/cm_t54/cm_t54.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <fdt_support.h>
 #include <usb.h>
 #include <mmc.h>
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index d3f3819..d9019de 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -11,7 +11,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <net.h>
 #include <spi.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 1994dec..2d0f78d 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -22,7 +22,6 @@
 #include <ahci.h>
 #include <dwc_ahsata.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <fsl_esdhc_imx.h>
 #include <fuse.h>
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index 74a6684..8a3d0ad 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -14,7 +14,6 @@
 #include <errno.h>
 #include <spl.h>
 #include <i2c.h>
-#include <environment.h>
 #include <watchdog.h>
 #include <debug_uart.h>
 #include <dm/ofnode.h>
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c
index f4b0ffc..76634a3 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -7,7 +7,6 @@
 #include <env.h>
 #include <errno.h>
 #include <linux/libfdt.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index 26bbbca..4ba8314 100644
--- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c
+++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
@@ -7,7 +7,6 @@
 #include <env.h>
 #include <errno.h>
 #include <linux/libfdt.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 3c40a4a..8a694a7 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -22,7 +22,6 @@
 #include <dm.h>
 #include <dm/platform_data/serial_mxc.h>
 #include <env.h>
-#include <environment.h>
 #include <hwconfig.h>
 #include <i2c.h>
 #include <fdt_support.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 6886ff9..b089137 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -15,7 +15,6 @@
 #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>
 
diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c
index aadf466..5448567 100644
--- a/board/ge/mx53ppd/mx53ppd.c
+++ b/board/ge/mx53ppd/mx53ppd.c
@@ -21,7 +21,6 @@
 #include <linux/libfdt.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/mx5_video.h>
-#include <environment.h>
 #include <netdev.h>
 #include <i2c.h>
 #include <mmc.h>
diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c
index 6b9e6e9..c6d5360 100644
--- a/board/grinn/chiliboard/board.c
+++ b/board/grinn/chiliboard/board.c
@@ -17,7 +17,6 @@
 #include <asm/io.h>
 #include <cpsw.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <miiphy.h>
 #include <spl.h>
diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c
index 7ae4c5c..f5beb8c 100644
--- a/board/gumstix/pepper/board.c
+++ b/board/gumstix/pepper/board.c
@@ -26,7 +26,6 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <power/tps65217.h>
-#include <environment.h>
 #include <watchdog.h>
 #include "board.h"
 
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index f72a660..5368b67 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -8,7 +8,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c
index f8f498d..f56b5b1 100644
--- a/board/intel/edison/edison.c
+++ b/board/intel/edison/edison.c
@@ -5,7 +5,6 @@
 #include <common.h>
 #include <dwc3-uboot.h>
 #include <env.h>
-#include <environment.h>
 #include <mmc.h>
 #include <u-boot/md5.h>
 #include <usb.h>
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index 398c945..a8c2b12 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -26,7 +26,6 @@
 #include <fdt_support.h>
 #include <mtd_node.h>
 #include <jffs2/load_kernel.h>
-#include <environment.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c
index 642adf7..9dae54d 100644
--- a/board/k+p/kp_imx53/kp_id_rev.c
+++ b/board/k+p/kp_imx53/kp_id_rev.c
@@ -11,7 +11,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include "kp_id_rev.h"
 
diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index e0f0d7c..b7b747d 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -25,7 +25,6 @@
 #include <asm/mach-imx/sata.h>
 #include <asm/mach-imx/video.h>
 #include <dwc_ahsata.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <i2c.h>
 #include <input.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 5c70e1b..037c4e6 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -26,7 +26,6 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <i2c.h>
-#include <environment.h>
 
 #include <dm.h>
 #include <dm/platform_data/serial_mxc.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index d92760b..354b63e 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -18,7 +18,6 @@
 #include "asm/arch/iomux.h"
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/gpio.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <netdev.h>
 #include <bootcount.h>
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index 5471612..6bfa417 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -16,7 +16,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <ns16550.h>
 #include <netdev.h>
 #include <twl4030.h>
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index bcae8fa..91d0395 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -7,7 +7,6 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
-#include <environment.h>
 #include <spi.h>
 #include <led.h>
 #include <wait_bit.h>
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index b1da5c9..fa5288b 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -6,7 +6,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <fdtdec.h>
 #include <i2c.h>
 #include <linux/libfdt.h>
diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c
index 8c91b75f..63cdb3a 100644
--- a/board/nvidia/p2771-0000/p2771-0000.c
+++ b/board/nvidia/p2771-0000/p2771-0000.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <fdtdec.h>
 #include <i2c.h>
 #include <linux/libfdt.h>
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 0cb85e9..43f6c5a 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -10,7 +10,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c
index 2417111..e1ebe8e 100644
--- a/board/phytec/pcm052/pcm052.c
+++ b/board/phytec/pcm052/pcm052.c
@@ -15,7 +15,6 @@
 #include <asm/arch/clock.h>
 #include <env.h>
 #include <led.h>
-#include <environment.h>
 #include <miiphy.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index 9f945e8..7b9178e 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -9,7 +9,6 @@
 #include <dm.h>
 #include <env.h>
 #include <environment.h>
-#include <fdtdec.h>
 #include <i2c.h>
 #include <i2c_eeprom.h>
 #include <netdev.h>
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 06d3d7e..d7f0f93 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -11,7 +11,6 @@
 #include <usb.h>
 #include <asm/gpio.h>
 #include <fdt_support.h>
-#include <environment.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/misc.h>
 
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 104589b..7a6ca8f 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -7,7 +7,6 @@
 #include <config.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <efi_loader.h>
 #include <fdt_support.h>
 #include <fdt_simplefb.h>
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
index 898abfb..08c5448 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -19,7 +19,6 @@
 #include <dm.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <linux/errno.h>
 #include <malloc.h>
diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index b14ce26..d0b850f 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c
index f643867..e1bed7d 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c
index 2d32440..d267120 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index e379950..6c76c3c 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c_eeprom.h>
 #include <netdev.h>
 
diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c
index 63ce4a2..1e095a4 100644
--- a/board/samtec/vining_fpga/socfpga.c
+++ b/board/samtec/vining_fpga/socfpga.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c
index cd224a8..049a65f 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 0a82a5e..30f0902 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -14,7 +14,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index d0efb67..1cf1f9e 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -15,7 +15,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c
index dc10b76..345701f 100644
--- a/board/silica/pengwyn/board.c
+++ b/board/silica/pengwyn/board.c
@@ -7,7 +7,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/ddr_defs.h>
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index d1df8fc..51985b9 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -19,7 +19,6 @@
 #include <env.h>
 #include <linux/sizes.h>
 #include <common.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <mmc.h>
 #include <i2c.h>
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index 8ddbee5..a9c9d37 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -30,7 +30,6 @@
 #include <power/tps65910.h>
 #include <environment.h>
 #include <watchdog.h>
-#include <environment.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c
index 38d3a3d..82eb0c2 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -17,7 +17,6 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/mach-imx/mx5_video.h>
-#include <environment.h>
 #include <mmc.h>
 #include <input.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index a00587c..4113a1c 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <misc.h>
 #include <spl.h>
 #include <syscon.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 58d09f7..54adcd5 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -36,7 +36,6 @@
 #include <power/tps65910.h>
 #include <environment.h>
 #include <watchdog.h>
-#include <environment.h>
 #include "../common/board_detect.h"
 #include "board.h"
 
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 756b516..2e09cc2 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <i2c.h>
 #include <linux/errno.h>
 #include <spl.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 0dacfd4..f78e6c2 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -24,7 +24,6 @@
 #include <asm/arch/sata.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/omap.h>
-#include <environment.h>
 #include <usb.h>
 #include <linux/usb/gadget.h>
 #include <dwc3-uboot.h>
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 97eef65..74d04bb 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -25,7 +25,6 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sata.h>
-#include <environment.h>
 #include <dwc3-uboot.h>
 #include <dwc3-omap-uboot.h>
 #include <i2c.h>
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index a4c094b..2b9385d 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -10,7 +10,6 @@
 #include <common.h>
 #include <cpsw.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
index de9e91a..8f7b591 100644
--- a/board/ti/ti816x/evm.c
+++ b/board/ti/ti816x/evm.c
@@ -8,7 +8,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <spl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index f8970b0..490d8cb 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -18,7 +18,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <ns16550.h>
 #include <twl4030.h>
 #include <asm/io.h>
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index a770472..af48b56 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -13,7 +13,6 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <linux/libfdt.h>
 
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 89f1b72..6421a22 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -27,7 +27,6 @@
 #include <dm/platform_data/serial_mxc.h>
 #include <dwc_ahsata.h>
 #include <env.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <imx_thermal.h>
 #include <micrel.h>
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c
index 69628b9..eae3c59 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.c
@@ -13,7 +13,6 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <linux/libfdt.h>
 
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index f657db8..ad40b58 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -25,7 +25,6 @@
 #include <asm/mach-imx/video.h>
 #include <cpu.h>
 #include <dm/platform_data/serial_mxc.h>
-#include <environment.h>
 #include <fsl_esdhc_imx.h>
 #include <imx_thermal.h>
 #include <micrel.h>
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index 71642a1..e9441a7 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <g_dnl.h>
 #include <linux/libfdt.h>
 
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index 5f5a51b..f554084 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -29,7 +29,6 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <power/tps65910.h>
-#include <environment.h>
 #include <watchdog.h>
 #include "board.h"
 
diff --git a/cmd/aes.c b/cmd/aes.c
index 25efb96..7ff4a71 100644
--- a/cmd/aes.c
+++ b/cmd/aes.c
@@ -7,7 +7,6 @@
 
 #include <common.h>
 #include <command.h>
-#include <environment.h>
 #include <uboot_aes.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
diff --git a/cmd/blob.c b/cmd/blob.c
index d3b6e45..80478b8 100644
--- a/cmd/blob.c
+++ b/cmd/blob.c
@@ -6,7 +6,6 @@
 
 #include <common.h>
 #include <command.h>
-#include <environment.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
diff --git a/cmd/bootm.c b/cmd/bootm.c
index b326ac9..8279f2b 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -11,7 +11,6 @@
 #include <bootm.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <errno.h>
 #include <image.h>
 #include <malloc.h>
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 961e8fa..ef97e19 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -9,7 +9,6 @@
 #include <common.h>
 #include <command.h>
 #include <efi_loader.h>
-#include <environment.h>
 #include <exports.h>
 #include <hexdump.h>
 #include <malloc.h>
diff --git a/cmd/elf.c b/cmd/elf.c
index 5e5cf47..538562f 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -17,7 +17,6 @@
 #include <command.h>
 #include <elf.h>
 #include <env.h>
-#include <environment.h>
 #include <net.h>
 #include <vxworks.h>
 #ifdef CONFIG_X86
diff --git a/cmd/ethsw.c b/cmd/ethsw.c
index 473324f..8846805 100644
--- a/cmd/ethsw.c
+++ b/cmd/ethsw.c
@@ -7,7 +7,7 @@
 
 #include <common.h>
 #include <command.h>
-#include <environment.h>
+#include <env.h>
 #include <errno.h>
 #include <env_flags.h>
 #include <ethsw.h>
diff --git a/cmd/i2c.c b/cmd/i2c.c
index 09c4ba9..e0f8ece 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -71,7 +71,6 @@
 #include <console.h>
 #include <dm.h>
 #include <edid.h>
-#include <environment.h>
 #include <errno.h>
 #include <i2c.h>
 #include <malloc.h>
diff --git a/cmd/ini.c b/cmd/ini.c
index f4faa7c..0c42526 100644
--- a/cmd/ini.c
+++ b/cmd/ini.c
@@ -14,7 +14,6 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
 
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c
index 56a5aa4..c14dd75 100644
--- a/cmd/tpm_test.c
+++ b/cmd/tpm_test.c
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <command.h>
-#include <environment.h>
 #include <tpm-v1.h>
 #include "tpm-user-utils.h"
 
diff --git a/common/image.c b/common/image.c
index 4a578f3..84e859a 100644
--- a/common/image.c
+++ b/common/image.c
@@ -17,7 +17,6 @@
 
 #include <rtc.h>
 
-#include <environment.h>
 #include <gzip.h>
 #include <image.h>
 #include <mapmem.h>
diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c
index 3f54ae0..5728d43 100644
--- a/common/spl/spl_dfu.c
+++ b/common/spl/spl_dfu.c
@@ -15,7 +15,6 @@
 #include <g_dnl.h>
 #include <usb.h>
 #include <dfu.h>
-#include <environment.h>
 
 static int run_dfu(int usb_index, char *interface, char *devstring)
 {
diff --git a/drivers/bootcount/bootcount_env.c b/drivers/bootcount/bootcount_env.c
index 50e0857..b75c900 100644
--- a/drivers/bootcount/bootcount_env.c
+++ b/drivers/bootcount/bootcount_env.c
@@ -6,7 +6,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 
 void bootcount_store(ulong a)
 {
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index a3540c1..f59b2bc 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -15,7 +15,6 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
-#include <environment.h>
 
 #define P_ID_AMD_STD CFI_CMDSET_AMD_LEGACY
 
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index a8b141a..080dbcf 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -10,7 +10,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <miiphy.h>
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index ce0f167..4c9dce8 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -15,7 +15,6 @@
 #include <nand.h>
 #include <spi_flash.h>
 #include <mmc.h>
-#include <environment.h>
 
 #ifdef CONFIG_ARM64
 #include <asm/armv8/mmu.h>
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 41752c0..e66fb16 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 #include <command.h>
 #include <config.h>
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index a8553cb..fb93041 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 
 #include <command.h>
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 3bc7a35..819a246 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -75,7 +75,6 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <net.h>
 #include <malloc.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index e2ca474..749f651 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -11,7 +11,6 @@
 #include <config.h>
 #include <common.h>
 #include <env.h>
-#include <environment.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c
index ac12cfe..21b8bbd 100644
--- a/drivers/net/ti/cpsw-common.c
+++ b/drivers/net/ti/cpsw-common.c
@@ -7,7 +7,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <environment.h>
 #include <fdt_support.h>
 #include <asm/io.h>
 #include <cpsw.h>
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 505ae9b..6e4d732 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -14,7 +14,6 @@
 #include <linux/immap_qe.h>
 #include <fsl_qe.h>
 #include <mmc.h>
-#include <environment.h>
 
 #ifdef CONFIG_ARCH_LS1021A
 #include <asm/arch/immap_ls102xa.h>
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index fa49d31..a118283 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -10,7 +10,6 @@
 #include <common.h>
 #include <console.h>
 #include <env.h>
-#include <environment.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/usb/ch9.h>
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index f75ca1a..b9bff89 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -8,7 +8,6 @@
 #include <common.h>
 #include <div64.h>
 #include <efi_loader.h>
-#include <environment.h>
 #include <malloc.h>
 #include <linux/libfdt_env.h>
 #include <u-boot/crc.h>
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 4e4f472..1d5d2f0 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -8,7 +8,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <net.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/net/eth_common.c b/net/eth_common.c
index dcc5918..ed26b1b 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -8,7 +8,6 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
 #include <miiphy.h>
 #include <net.h>
 #include "eth_internal.h"
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 0f558b2..850f362 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -8,7 +8,6 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <environment.h>
 #include <net.h>
 #include <phy.h>
 #include <linux/errno.h>
diff --git a/net/wol.c b/net/wol.c
index 5154334..0a62566 100644
--- a/net/wol.c
+++ b/net/wol.c
@@ -7,7 +7,6 @@
 #include <command.h>
 #include <env.h>
 #include <net.h>
-#include <environment.h>
 #include "wol.h"
 
 static ulong wol_timeout = WOL_DEFAULT_TIMEOUT;