Kaynağa Gözat

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>
Simon Glass 4 yıl önce
ebeveyn
işleme
f3998fdc4d
75 değiştirilmiş dosya ile 85 ekleme ve 77 silme
  1. 1 1
      api/api.c
  2. 1 1
      arch/arm/cpu/armv8/fsl-layerscape/cpu.c
  3. 1 1
      arch/arm/cpu/armv8/fsl-layerscape/soc.c
  4. 1 1
      arch/x86/cpu/qemu/e820.c
  5. 1 1
      board/Arcturus/ucp1020/spl.c
  6. 1 1
      board/amlogic/w400/w400.c
  7. 1 1
      board/birdland/bav335x/board.c
  8. 1 1
      board/bosch/guardian/board.c
  9. 1 1
      board/bosch/shc/board.c
  10. 1 1
      board/buffalo/lsxl/lsxl.c
  11. 1 1
      board/freescale/b4860qds/spl.c
  12. 1 1
      board/freescale/c29xpcie/spl.c
  13. 1 1
      board/freescale/ls1012afrdm/ls1012afrdm.c
  14. 1 1
      board/freescale/ls1012aqds/ls1012aqds.c
  15. 1 1
      board/freescale/ls1012ardb/ls1012ardb.c
  16. 1 1
      board/freescale/ls1028a/ls1028a.c
  17. 1 1
      board/freescale/ls1088a/ls1088a.c
  18. 1 1
      board/freescale/ls2080a/ls2080a.c
  19. 1 1
      board/freescale/ls2080aqds/ls2080aqds.c
  20. 1 1
      board/freescale/ls2080ardb/ls2080ardb.c
  21. 1 1
      board/freescale/lx2160a/lx2160a.c
  22. 1 1
      board/freescale/p1010rdb/spl.c
  23. 1 1
      board/freescale/p1022ds/spl.c
  24. 1 1
      board/freescale/p1_p2_rdb_pc/spl.c
  25. 1 1
      board/freescale/t102xqds/spl.c
  26. 1 1
      board/freescale/t102xrdb/spl.c
  27. 1 1
      board/freescale/t104xrdb/spl.c
  28. 1 1
      board/freescale/t208xqds/spl.c
  29. 1 1
      board/freescale/t208xrdb/spl.c
  30. 1 1
      board/freescale/t4qds/spl.c
  31. 1 1
      board/freescale/t4rdb/spl.c
  32. 1 1
      board/gardena/smart-gateway-mt7688/board.c
  33. 1 1
      board/phytec/phycore_rk3288/phycore-rk3288.c
  34. 1 1
      board/renesas/alt/alt.c
  35. 1 1
      board/renesas/gose/gose.c
  36. 1 1
      board/renesas/koelsch/koelsch.c
  37. 1 1
      board/renesas/lager/lager.c
  38. 1 1
      board/renesas/porter/porter.c
  39. 1 1
      board/renesas/silk/silk.c
  40. 1 1
      board/renesas/stout/stout.c
  41. 1 1
      board/st/stm32mp1/stm32mp1.c
  42. 1 1
      board/sunxi/board.c
  43. 1 1
      board/tcl/sl50/board.c
  44. 1 1
      board/ti/am335x/board.c
  45. 1 1
      board/toradex/apalis-tk1/apalis-tk1.c
  46. 1 1
      cmd/nvedit.c
  47. 1 1
      common/board_f.c
  48. 1 1
      common/board_r.c
  49. 1 1
      common/console.c
  50. 1 1
      drivers/mtd/cfi_flash.c
  51. 1 1
      drivers/serial/serial-uclass.c
  52. 1 1
      drivers/serial/serial.c
  53. 1 1
      env/callback.c
  54. 1 1
      env/common.c
  55. 1 1
      env/eeprom.c
  56. 1 1
      env/embedded.c
  57. 1 1
      env/env.c
  58. 1 1
      env/ext4.c
  59. 1 1
      env/fat.c
  60. 1 1
      env/flags.c
  61. 1 1
      env/flash.c
  62. 1 1
      env/mmc.c
  63. 1 1
      env/nand.c
  64. 1 1
      env/nowhere.c
  65. 1 1
      env/nvram.c
  66. 1 1
      env/onenand.c
  67. 1 1
      env/remote.c
  68. 1 1
      env/sata.c
  69. 1 1
      env/sf.c
  70. 1 1
      env/ubi.c
  71. 1 1
      include/common.h
  72. 11 3
      include/env_internal.h
  73. 1 1
      lib/efi_loader/efi_variable.c
  74. 1 1
      net/net.c
  75. 1 1
      tools/envcrc.c

+ 1 - 1
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>
 

+ 1 - 1
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

+ 1 - 1
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
 

+ 1 - 1
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;

+ 1 - 1
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>

+ 1 - 1
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>
 

+ 1 - 1
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"
 

+ 1 - 1
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>

+ 1 - 1
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"

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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;

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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"
 

+ 1 - 1
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"

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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;

+ 1 - 1
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>
 

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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;

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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. */

+ 1 - 1
env/env.c

@@ -6,7 +6,7 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
+#include <env_internal.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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;

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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>

+ 1 - 1
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_ */

+ 11 - 3
include/environment.h → 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_ */

+ 1 - 1
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>
 

+ 1 - 1
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>

+ 1 - 1
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 */