aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-02 09:44:25 -0600
committerTom Rini <trini@konsulko.com>2019-08-11 19:27:31 -0400
commitf3998fdc4d0871727d7be6838bac750c6323c0a8 (patch)
treea70bc57308dd8c516ec78ea057dbfd0ac331214b
parente7dcf5645f09504573f534b0fc9abbbc6ff8a5ad (diff)
downloadu-boot-f3998fdc4d0871727d7be6838bac750c6323c0a8.zip
u-boot-f3998fdc4d0871727d7be6838bac750c6323c0a8.tar.gz
u-boot-f3998fdc4d0871727d7be6838bac750c6323c0a8.tar.bz2
env: Rename environment.h to env_internal.h
This file contains lots of internal details about the environment. Most code can include env.h instead, calling the functions there as needed. Rename this file and add a comment at the top to indicate its internal nature. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Fixup apalis-tk1.c] Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--api/api.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/cpu.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/soc.c2
-rw-r--r--arch/x86/cpu/qemu/e820.c2
-rw-r--r--board/Arcturus/ucp1020/spl.c2
-rw-r--r--board/amlogic/w400/w400.c2
-rw-r--r--board/birdland/bav335x/board.c2
-rw-r--r--board/bosch/guardian/board.c2
-rw-r--r--board/bosch/shc/board.c2
-rw-r--r--board/buffalo/lsxl/lsxl.c2
-rw-r--r--board/freescale/b4860qds/spl.c2
-rw-r--r--board/freescale/c29xpcie/spl.c2
-rw-r--r--board/freescale/ls1012afrdm/ls1012afrdm.c2
-rw-r--r--board/freescale/ls1012aqds/ls1012aqds.c2
-rw-r--r--board/freescale/ls1012ardb/ls1012ardb.c2
-rw-r--r--board/freescale/ls1028a/ls1028a.c2
-rw-r--r--board/freescale/ls1088a/ls1088a.c2
-rw-r--r--board/freescale/ls2080a/ls2080a.c2
-rw-r--r--board/freescale/ls2080aqds/ls2080aqds.c2
-rw-r--r--board/freescale/ls2080ardb/ls2080ardb.c2
-rw-r--r--board/freescale/lx2160a/lx2160a.c2
-rw-r--r--board/freescale/p1010rdb/spl.c2
-rw-r--r--board/freescale/p1022ds/spl.c2
-rw-r--r--board/freescale/p1_p2_rdb_pc/spl.c2
-rw-r--r--board/freescale/t102xqds/spl.c2
-rw-r--r--board/freescale/t102xrdb/spl.c2
-rw-r--r--board/freescale/t104xrdb/spl.c2
-rw-r--r--board/freescale/t208xqds/spl.c2
-rw-r--r--board/freescale/t208xrdb/spl.c2
-rw-r--r--board/freescale/t4qds/spl.c2
-rw-r--r--board/freescale/t4rdb/spl.c2
-rw-r--r--board/gardena/smart-gateway-mt7688/board.c2
-rw-r--r--board/phytec/phycore_rk3288/phycore-rk3288.c2
-rw-r--r--board/renesas/alt/alt.c2
-rw-r--r--board/renesas/gose/gose.c2
-rw-r--r--board/renesas/koelsch/koelsch.c2
-rw-r--r--board/renesas/lager/lager.c2
-rw-r--r--board/renesas/porter/porter.c2
-rw-r--r--board/renesas/silk/silk.c2
-rw-r--r--board/renesas/stout/stout.c2
-rw-r--r--board/st/stm32mp1/stm32mp1.c2
-rw-r--r--board/sunxi/board.c2
-rw-r--r--board/tcl/sl50/board.c2
-rw-r--r--board/ti/am335x/board.c2
-rw-r--r--board/toradex/apalis-tk1/apalis-tk1.c2
-rw-r--r--cmd/nvedit.c2
-rw-r--r--common/board_f.c2
-rw-r--r--common/board_r.c2
-rw-r--r--common/console.c2
-rw-r--r--drivers/mtd/cfi_flash.c2
-rw-r--r--drivers/serial/serial-uclass.c2
-rw-r--r--drivers/serial/serial.c2
-rw-r--r--env/callback.c2
-rw-r--r--env/common.c2
-rw-r--r--env/eeprom.c2
-rw-r--r--env/embedded.c2
-rw-r--r--env/env.c2
-rw-r--r--env/ext4.c2
-rw-r--r--env/fat.c2
-rw-r--r--env/flags.c2
-rw-r--r--env/flash.c2
-rw-r--r--env/mmc.c2
-rw-r--r--env/nand.c2
-rw-r--r--env/nowhere.c2
-rw-r--r--env/nvram.c2
-rw-r--r--env/onenand.c2
-rw-r--r--env/remote.c2
-rw-r--r--env/sata.c2
-rw-r--r--env/sf.c2
-rw-r--r--env/ubi.c2
-rw-r--r--include/common.h2
-rw-r--r--include/env_internal.h (renamed from include/environment.h)14
-rw-r--r--lib/efi_loader/efi_variable.c2
-rw-r--r--net/net.c2
-rw-r--r--tools/envcrc.c2
75 files changed, 85 insertions, 77 deletions
diff --git a/api/api.c b/api/api.c
index cd7487f..bc9454e 100644
--- a/api/api.c
+++ b/api/api.c
@@ -10,7 +10,7 @@
#include <common.h>
#include <env.h>
#include <malloc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/types.h>
#include <api_public.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 9577ada..26f4fda 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -33,7 +33,7 @@
#include <fsl_qbman.h>
#ifdef CONFIG_TFABOOT
-#include <environment.h>
+#include <env_internal.h>
#ifdef CONFIG_CHAIN_OF_TRUST
#include <fsl_validate.h>
#endif
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 00c705f..ca80059 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -27,7 +27,7 @@
#endif
#include <fsl_immap.h>
#ifdef CONFIG_TFABOOT
-#include <environment.h>
+#include <env_internal.h>
DECLARE_GLOBAL_DATA_PTR;
#endif
diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c
index 7b3bc7d..e682486 100644
--- a/arch/x86/cpu/qemu/e820.c
+++ b/arch/x86/cpu/qemu/e820.c
@@ -4,7 +4,7 @@
*/
#include <common.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/e820.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index f3b7d99..9314fab 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -10,7 +10,7 @@
#include <common.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
index 4737865..e60dc3a 100644
--- a/board/amlogic/w400/w400.c
+++ b/board/amlogic/w400/w400.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <dm.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/io.h>
#include <asm/arch/eth.h>
diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c
index 9e64cbb..8811583a 100644
--- a/board/birdland/bav335x/board.c
+++ b/board/birdland/bav335x/board.c
@@ -28,7 +28,7 @@
#include <cpsw.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
-#include <environment.h>
+#include <env_internal.h>
#include <watchdog.h>
#include "board.h"
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index bc3c6d2..ec0c4a17 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <cpsw.h>
#include <dm.h>
-#include <environment.h>
+#include <env_internal.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 358118f..a96fdef 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -31,7 +31,7 @@
#include <miiphy.h>
#include <cpsw.h>
#include <power/tps65217.h>
-#include <environment.h>
+#include <env_internal.h>
#include <watchdog.h>
#include "mmc.h"
#include "board.h"
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index b2ccb83..95d3a5e 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <net.h>
#include <malloc.h>
#include <netdev.h>
diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c
index d9aa57f..6dfc0c7 100644
--- a/board/freescale/b4860qds/spl.c
+++ b/board/freescale/b4860qds/spl.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/spl.h>
#include <malloc.h>
#include <ns16550.h>
diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c
index 5db60d8..2904096 100644
--- a/board/freescale/c29xpcie/spl.c
+++ b/board/freescale/c29xpcie/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index b4c611e..31e41ce 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -15,7 +15,7 @@
#include <asm/arch/soc.h>
#include <fsl_esdhc.h>
#include <hwconfig.h>
-#include <environment.h>
+#include <env_internal.h>
#include <fsl_mmdc.h>
#include <netdev.h>
#include <fsl_sec.h>
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index a862fe6..86c72ee 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -18,7 +18,7 @@
#include <ahci.h>
#include <hwconfig.h>
#include <mmc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <scsi.h>
#include <fm_eth.h>
#include <fsl_esdhc.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index f648a90..e4527c1 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -18,7 +18,7 @@
#include <mmc.h>
#include <scsi.h>
#include <fsl_esdhc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <fsl_mmdc.h>
#include <netdev.h>
#include <fsl_sec.h>
diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index e5de4eb..4aa7cec 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -11,7 +11,7 @@
#include <hwconfig.h>
#include <fdt_support.h>
#include <linux/libfdt.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/arch-fsl-layerscape/soc.h>
#include <i2c.h>
#include <asm/arch/soc.h>
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index a1c9eb3..f0bea73 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -15,7 +15,7 @@
#include <fdt_support.h>
#include <linux/libfdt.h>
#include <fsl-mc/fsl_mc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/arch-fsl-layerscape/soc.h>
#include <asm/arch/ppa.h>
#include <hwconfig.h>
diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c
index cc1822d..413a698 100644
--- a/board/freescale/ls2080a/ls2080a.c
+++ b/board/freescale/ls2080a/ls2080a.c
@@ -12,7 +12,7 @@
#include <fdt_support.h>
#include <linux/libfdt.h>
#include <fsl-mc/fsl_mc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/arch/soc.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index e9e0999..e9c0557 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -13,7 +13,7 @@
#include <fdt_support.h>
#include <linux/libfdt.h>
#include <fsl-mc/fsl_mc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <i2c.h>
#include <rtc.h>
#include <asm/arch/soc.h>
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index a278e2f..2b2dbbb 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -15,7 +15,7 @@
#include <fdt_support.h>
#include <linux/libfdt.h>
#include <fsl-mc/fsl_mc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <efi_loader.h>
#include <i2c.h>
#include <asm/arch/mmu.h>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index 3b4cb86..f3885fa 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -16,7 +16,7 @@
#include <fdt_support.h>
#include <linux/libfdt.h>
#include <fsl-mc/fsl_mc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <efi_loader.h>
#include <asm/arch/mmu.h>
#include <hwconfig.h>
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index 95f8b58..8f050b3 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 92fd199..06273f1 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index 9d7b5ef..dbf9f73 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <ns16550.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c
index 1b58174..3008f09 100644
--- a/board/freescale/t102xqds/spl.c
+++ b/board/freescale/t102xqds/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c
index a226d4b..029e3d2 100644
--- a/board/freescale/t102xrdb/spl.c
+++ b/board/freescale/t102xrdb/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c
index 58a7376..7b0eb8e 100644
--- a/board/freescale/t104xrdb/spl.c
+++ b/board/freescale/t104xrdb/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c
index 27f3c4c..9695dfc 100644
--- a/board/freescale/t208xqds/spl.c
+++ b/board/freescale/t208xqds/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c
index ecb1e0d..ca7d6a2 100644
--- a/board/freescale/t208xrdb/spl.c
+++ b/board/freescale/t208xrdb/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <ns16550.h>
#include <nand.h>
diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c
index 16cc29e..7666fe7 100644
--- a/board/freescale/t4qds/spl.c
+++ b/board/freescale/t4qds/spl.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/spl.h>
#include <malloc.h>
#include <ns16550.h>
diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c
index cc2b2f9..a19558b 100644
--- a/board/freescale/t4rdb/spl.c
+++ b/board/freescale/t4rdb/spl.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/spl.h>
#include <malloc.h>
#include <ns16550.h>
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index baa3e57..bd494c8 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <led.h>
#include <net.h>
#include <spi.h>
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index 7b9178e..5fcbf65 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <i2c.h>
#include <i2c_eeprom.h>
#include <netdev.h>
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index 7797970..10ef7f9 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -10,7 +10,7 @@
#include <malloc.h>
#include <dm.h>
#include <dm/platform_data/serial_sh.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index bffa85c..f86c9f1 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -10,7 +10,7 @@
#include <malloc.h>
#include <dm.h>
#include <dm/platform_data/serial_sh.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index 1bb3b49..841d337 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -11,7 +11,7 @@
#include <malloc.h>
#include <dm.h>
#include <dm/platform_data/serial_sh.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index bda3295..3cb1a56 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index d3afc2a..86f79da 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -11,7 +11,7 @@
#include <malloc.h>
#include <dm.h>
#include <dm/platform_data/serial_sh.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index bda6a41..25221e3 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -11,7 +11,7 @@
#include <malloc.h>
#include <dm.h>
#include <dm/platform_data/serial_sh.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index 95b5711..0a0ff5f 100644
--- a/board/renesas/stout/stout.c
+++ b/board/renesas/stout/stout.c
@@ -14,7 +14,7 @@
#include <netdev.h>
#include <dm.h>
#include <dm/platform_data/serial_sh.h>
-#include <environment.h>
+#include <env_internal.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 1f9251d..279c7b7 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -9,7 +9,7 @@
#include <clk.h>
#include <dm.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <g_dnl.h>
#include <generic-phy.h>
#include <i2c.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index bb425cb..e3b2d13 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -30,7 +30,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <u-boot/crc.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/libfdt.h>
#include <nand.h>
#include <net.h>
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index a9c9d37..c7eed31 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -28,7 +28,7 @@
#include <cpsw.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
-#include <environment.h>
+#include <env_internal.h>
#include <watchdog.h>
#include "board.h"
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 54adcd5..7eaa6cd 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -34,7 +34,7 @@
#include <cpsw.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
-#include <environment.h>
+#include <env_internal.h>
#include <watchdog.h>
#include "../common/board_detect.h"
#include "board.h"
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index beb7e10..bc98858 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -10,7 +10,7 @@
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
-#include <environment.h>
+#include <env_internal.h>
#include <pci_tegra.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 8e85722..1cb0bc1 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -28,7 +28,7 @@
#include <command.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <search.h>
#include <errno.h>
#include <malloc.h>
diff --git a/common/board_f.c b/common/board_f.c
index 18937bf..31181a9 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -15,7 +15,7 @@
#include <cpu.h>
#include <dm.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <fdtdec.h>
#include <fs.h>
#include <i2c.h>
diff --git a/common/board_r.c b/common/board_r.c
index f4193cd..1dabf5a 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -19,7 +19,7 @@
#include <console.h>
#include <dm.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <fdtdec.h>
#include <ide.h>
#include <initcall.h>
diff --git a/common/console.c b/common/console.c
index 0f7e091..89b1e95 100644
--- a/common/console.c
+++ b/common/console.c
@@ -17,7 +17,7 @@
#include <serial.h>
#include <stdio_dev.h>
#include <exports.h>
-#include <environment.h>
+#include <env_internal.h>
#include <watchdog.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 6c22f07..c59254c 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -26,7 +26,7 @@
#include <asm/io.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
-#include <environment.h>
+#include <env_internal.h>
#include <mtd/cfi_flash.h>
#include <watchdog.h>
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index d4488a2..dcdaede 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <dm.h>
-#include <environment.h>
+#include <env_internal.h>
#include <errno.h>
#include <os.h>
#include <serial.h>
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 09365ba..b907508 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -5,7 +5,7 @@
*/
#include <common.h>
-#include <environment.h>
+#include <env_internal.h>
#include <serial.h>
#include <stdio_dev.h>
#include <post.h>
diff --git a/env/callback.c b/env/callback.c
index d5469ce..f0904cf 100644
--- a/env/callback.c
+++ b/env/callback.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/common.c b/env/common.c
index 474ea22..3fb6050 100644
--- a/env/common.c
+++ b/env/common.c
@@ -10,7 +10,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <search.h>
#include <errno.h>
diff --git a/env/eeprom.c b/env/eeprom.c
index 91ee3f3..cb04d2a 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -10,7 +10,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#if defined(CONFIG_I2C_ENV_EEPROM_BUS)
#include <i2c.h>
diff --git a/env/embedded.c b/env/embedded.c
index b1090e9..a38e169 100644
--- a/env/embedded.c
+++ b/env/embedded.c
@@ -12,7 +12,7 @@
#define __ASM_STUB_PROCESSOR_H__ /* don't include asm/processor. */
#include <config.h>
#undef __ASSEMBLY__
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stringify.h>
/* Handle HOSTS that have prepended crap on symbol names, not TARGETS. */
diff --git a/env/env.c b/env/env.c
index 9d421e8..9237bb9 100644
--- a/env/env.c
+++ b/env/env.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/ext4.c b/env/ext4.c
index 6aa3686..1f6b1b5 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -22,7 +22,7 @@
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/env/fat.c b/env/fat.c
index d23753c..1836556 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -10,7 +10,7 @@
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/env/flags.c b/env/flags.c
index 93d337a..418d6cc 100644
--- a/env/flags.c
+++ b/env/flags.c
@@ -19,7 +19,7 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#else
#include <common.h>
-#include <environment.h>
+#include <env_internal.h>
#endif
#ifdef CONFIG_CMD_NET
diff --git a/env/flash.c b/env/flash.c
index bdba09e..231a5fd 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -12,7 +12,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>
diff --git a/env/mmc.c b/env/mmc.c
index 4ca7c2b..9f1878d 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -9,7 +9,7 @@
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <fdtdec.h>
#include <linux/stddef.h>
#include <malloc.h>
diff --git a/env/nand.c b/env/nand.c
index 3e2235f..9f3dc63 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -16,7 +16,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/env/nowhere.c b/env/nowhere.c
index 7db4eec..f5b0a17 100644
--- a/env/nowhere.c
+++ b/env/nowhere.c
@@ -10,7 +10,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/nvram.c b/env/nvram.c
index a5b1873..79201bd 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -26,7 +26,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <search.h>
#include <errno.h>
diff --git a/env/onenand.c b/env/onenand.c
index d371bd7..dfd4e93 100644
--- a/env/onenand.c
+++ b/env/onenand.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <command.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>
diff --git a/env/remote.c b/env/remote.c
index b1a7d1a..02531f4 100644
--- a/env/remote.c
+++ b/env/remote.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <command.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#ifdef ENV_IS_EMBEDDED
diff --git a/env/sata.c b/env/sata.c
index a5364dd..9369710 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -9,7 +9,7 @@
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <errno.h>
#include <memalign.h>
diff --git a/env/sf.c b/env/sf.c
index 09646e1..590d0ce 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <malloc.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/env/ubi.c b/env/ubi.c
index a69db14..08aac47 100644
--- a/env/ubi.c
+++ b/env/ubi.c
@@ -8,7 +8,7 @@
#include <command.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <errno.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/include/common.h b/include/common.h
index 34ae514..f8afbc0 100644
--- a/include/common.h
+++ b/include/common.h
@@ -394,7 +394,7 @@ int cpu_release(u32 nr, int argc, char * const argv[]);
/* Pull in stuff for the build system */
#ifdef DO_DEPS_ONLY
-# include <environment.h>
+# include <env_internal.h>
#endif
#endif /* __COMMON_H_ */
diff --git a/include/environment.h b/include/env_internal.h
index cc8c054..b1ddcb5 100644
--- a/include/environment.h
+++ b/include/env_internal.h
@@ -1,11 +1,19 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
+ * Internal environment header file. This includes direct access to environment
+ * information such as its size and offset, direct access to the default
+ * environment and embedded environment (if used). It also provides environment
+ * drivers with various declarations.
+ *
+ * It should not be included by board files, drivers and code other than that
+ * related to the environment implementation.
+ *
* (C) Copyright 2002
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
-#ifndef _ENVIRONMENT_H_
-#define _ENVIRONMENT_H_
+#ifndef _ENV_INTERNAL_H_
+#define _ENV_INTERNAL_H_
#include <linux/kconfig.h>
@@ -267,4 +275,4 @@ extern struct hsearch_data env_htab;
#endif /* DO_DEPS_ONLY */
-#endif /* _ENVIRONMENT_H_ */
+#endif /* _ENV_INTERNAL_H_ */
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index 8a0e0db..6687b69 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -10,7 +10,7 @@
#include <charset.h>
#include <efi_loader.h>
#include <hexdump.h>
-#include <environment.h>
+#include <env_internal.h>
#include <search.h>
#include <uuid.h>
diff --git a/net/net.c b/net/net.c
index f0a3996..40511db 100644
--- a/net/net.c
+++ b/net/net.c
@@ -91,7 +91,7 @@
#include <command.h>
#include <console.h>
#include <env.h>
-#include <environment.h>
+#include <env_internal.h>
#include <errno.h>
#include <net.h>
#include <net/fastboot.h>
diff --git a/tools/envcrc.c b/tools/envcrc.c
index 7eb7246..672ef4d 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -59,7 +59,7 @@
#ifdef CONFIG_BUILD_ENVCRC
-# include <environment.h>
+# include <env_internal.h>
extern unsigned int env_size;
extern env_t embedded_environment;
#endif /* CONFIG_BUILD_ENVCRC */