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>
This commit is contained in:
Simon Glass 2019-08-02 09:44:25 -06:00 committed by Tom Rini
parent e7dcf5645f
commit f3998fdc4d
75 changed files with 85 additions and 77 deletions

View file

@ -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>

View file

@ -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

View file

@ -27,7 +27,7 @@
#endif
#include <fsl_immap.h>
#ifdef CONFIG_TFABOOT
#include <environment.h>
#include <env_internal.h>
DECLARE_GLOBAL_DATA_PTR;
#endif

View file

@ -4,7 +4,7 @@
*/
#include <common.h>
#include <environment.h>
#include <env_internal.h>
#include <asm/e820.h>
DECLARE_GLOBAL_DATA_PTR;

View file

@ -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>

View file

@ -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>

View file

@ -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"

View file

@ -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>

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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"

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -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>

View file

@ -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>

View file

@ -5,7 +5,7 @@
*/
#include <common.h>
#include <environment.h>
#include <env_internal.h>
#include <serial.h>
#include <stdio_dev.h>
#include <post.h>

2
env/callback.c vendored
View file

@ -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;

2
env/common.c vendored
View file

@ -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>

2
env/eeprom.c vendored
View file

@ -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>

2
env/embedded.c vendored
View file

@ -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. */

2
env/env.c vendored
View file

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

2
env/ext4.c vendored
View file

@ -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>

2
env/fat.c vendored
View file

@ -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>

2
env/flags.c vendored
View file

@ -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

2
env/flash.c vendored
View file

@ -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>

2
env/mmc.c vendored
View file

@ -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>

2
env/nand.c vendored
View file

@ -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>

2
env/nowhere.c vendored
View file

@ -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;

2
env/nvram.c vendored
View file

@ -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>

2
env/onenand.c vendored
View file

@ -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>

2
env/remote.c vendored
View file

@ -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

2
env/sata.c vendored
View file

@ -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>

2
env/sf.c vendored
View file

@ -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>

2
env/ubi.c vendored
View file

@ -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>

View file

@ -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_ */

View file

@ -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_ */

View file

@ -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>

View file

@ -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>

View file

@ -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 */