[v2 01/16] qe: Add <config.h> to linux/immap_qe.h

Given how we define QE_MURAM_SIZE today, this header needs to have <config.h> added to it.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- include/linux/immap_qe.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/linux/immap_qe.h b/include/linux/immap_qe.h index 45307f51c103..a692f5dfb373 100644 --- a/include/linux/immap_qe.h +++ b/include/linux/immap_qe.h @@ -11,6 +11,8 @@ #ifndef __IMMAP_QE_H__ #define __IMMAP_QE_H__
+#include <config.h> + #ifdef CONFIG_MPC83xx #if defined(CONFIG_ARCH_MPC8360) #define QE_MURAM_SIZE 0xc000UL

We need to include <config.h> directly when a file needs to have something such as CFG_SYS_SDRAM_SIZE referenced as this file is not automatically globally included and is most commonly indirectly included via common.h. Remove most cases of arc including config.h directly, but add it where needed. Further clean up the tb100 board config.h file so that we don't rely on config.h being included there for a value used in a single place.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- arch/arc/include/asm/arc-bcr.h | 2 -- arch/arc/include/asm/arcregs.h | 1 - arch/arc/include/asm/cache.h | 2 -- arch/arc/lib/cpu.c | 1 + board/abilis/tb100/tb100.c | 4 ++++ include/configs/tb100.h | 21 --------------------- 6 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/arch/arc/include/asm/arc-bcr.h b/arch/arc/include/asm/arc-bcr.h index 823906d946e4..a6c972bf1e31 100644 --- a/arch/arc/include/asm/arc-bcr.h +++ b/arch/arc/include/asm/arc-bcr.h @@ -13,8 +13,6 @@ #define __ARC_BCR_H #ifndef __ASSEMBLY__
-#include <config.h> - union bcr_di_cache { struct { #ifdef CONFIG_CPU_BIG_ENDIAN diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h index a9f54f61e0cc..273fb8eed859 100644 --- a/arch/arc/include/asm/arcregs.h +++ b/arch/arc/include/asm/arcregs.h @@ -7,7 +7,6 @@ #define _ASM_ARC_ARCREGS_H
#include <asm/cache.h> -#include <config.h>
/* * ARC architecture has additional address space - auxiliary registers. diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h index 74cff716ef60..65dff4214830 100644 --- a/arch/arc/include/asm/cache.h +++ b/arch/arc/include/asm/cache.h @@ -6,8 +6,6 @@ #ifndef __ASM_ARC_CACHE_H #define __ASM_ARC_CACHE_H
-#include <config.h> - /* * As of today we may handle any L1 cache line length right in software. * For that essentially cache line length is a variable not constant. diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c index 803dfd425580..593950449f2e 100644 --- a/arch/arc/lib/cpu.c +++ b/arch/arc/lib/cpu.c @@ -3,6 +3,7 @@ * Copyright (C) 2013-2014, 2018 Synopsys, Inc. All rights reserved. */
+#include <config.h> #include <clock_legacy.h> #include <init.h> #include <malloc.h> diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c index 3dc9e14ef8c0..eb7d12908134 100644 --- a/board/abilis/tb100/tb100.c +++ b/board/abilis/tb100/tb100.c @@ -14,6 +14,10 @@ void reset_cpu(void) writel(0x1, (void *)CRM_SWRESET); }
+/* + * Ethernet configuration + */ +#define ETH0_BASE_ADDRESS 0xFE100000 int board_eth_init(struct bd_info *bis) { if (designware_initialize(ETH0_BASE_ADDRESS, 0) >= 0) diff --git a/include/configs/tb100.h b/include/configs/tb100.h index 1318f5e5ee44..08b6f3219c33 100644 --- a/include/configs/tb100.h +++ b/include/configs/tb100.h @@ -21,25 +21,4 @@ */ #define CFG_SYS_NS16550_CLK 166666666
-/* - * Even though the board houses Realtek RTL8211E PHY - * corresponding PHY driver (drivers/net/phy/realtek.c) behaves unexpectedly. - * In particular "parse_status" reports link is down. - * - * Until Realtek PHY driver is fixed fall back to generic PHY driver - * which implements all required functionality and behaves much more stable. - * - * - */ - -/* - * Ethernet configuration - */ -#define ETH0_BASE_ADDRESS 0xFE100000 -#define ETH1_BASE_ADDRESS 0xFE110000 - -/* - * Console configuration - */ - #endif /* _CONFIG_TB100_H_ */

We need to include <config.h> directly when a file needs to have something such as CFG_SYS_SDRAM_SIZE referenced as this file is not automatically globally included and is most commonly indirectly included via common.h. Remove most cases of arm including config.h directly, but add it where needed. This includes a few board-specific fixes.
Signed-off-by: Tom Rini trini@konsulko.com --- Changes in v2: - Update arch/arm/mach-keystone/cmd_mon.c --- arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h | 2 -- arch/arm/include/asm/arch-ls102xa/fsl_serdes.h | 2 -- arch/arm/include/asm/assembler.h | 1 - arch/arm/include/asm/secure.h | 1 - arch/arm/include/asm/string.h | 2 -- arch/arm/mach-davinci/include/mach/pinmux_defs.h | 1 - arch/arm/mach-exynos/exynos4_setup.h | 1 - arch/arm/mach-exynos/exynos5_setup.h | 1 - arch/arm/mach-k3/common.c | 1 + arch/arm/mach-k3/include/mach/clock.h | 2 -- arch/arm/mach-k3/include/mach/j721e_hardware.h | 1 - arch/arm/mach-k3/include/mach/j721s2_hardware.h | 1 - arch/arm/mach-keystone/cmd_mon.c | 1 + board/freescale/ls1088a/eth_ls1088aqds.c | 1 + board/freescale/ls2080aqds/eth.c | 1 + board/toradex/verdin-am62/verdin-am62.c | 1 + drivers/ddr/marvell/axp/ddr3_axp.h | 2 ++ 17 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h index 8f4365175697..9e29350ca4ba 100644 --- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h +++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h @@ -7,8 +7,6 @@ #ifndef __FSL_SERDES_H__ #define __FSL_SERDES_H__
-#include <config.h> - #ifdef CONFIG_FSL_LSCH3 enum srds_prtcl { /* diff --git a/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h b/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h index d99a6f318f8b..9244e0a78fd3 100644 --- a/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h +++ b/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h @@ -6,8 +6,6 @@ #ifndef __FSL_SERDES_H #define __FSL_SERDES_H
-#include <config.h> - enum srds_prtcl { /* * Nobody will check whether the device 'NONE' has been configured, diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 8d42ef4823e9..4fda483b8d8d 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -14,7 +14,6 @@ * assembler source. */
-#include <config.h> #include <asm/unified.h>
/* diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h index c7b00be8e0b9..abfa46470b2c 100644 --- a/arch/arm/include/asm/secure.h +++ b/arch/arm/include/asm/secure.h @@ -1,7 +1,6 @@ #ifndef __ASM_SECURE_H #define __ASM_SECURE_H
-#include <config.h> #include <asm/global_data.h>
#define __secure __section("._secure.text") diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h index ead3f2c35643..c9ecdde0d3d8 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_STRING_H #define __ASM_ARM_STRING_H
-#include <config.h> - /* * We don't do inline string functions, since the * optimised inline asm versions are not small. diff --git a/arch/arm/mach-davinci/include/mach/pinmux_defs.h b/arch/arm/mach-davinci/include/mach/pinmux_defs.h index 4901ba49c9bb..120935310807 100644 --- a/arch/arm/mach-davinci/include/mach/pinmux_defs.h +++ b/arch/arm/mach-davinci/include/mach/pinmux_defs.h @@ -9,7 +9,6 @@ #define __ASM_ARCH_PINMUX_DEFS_H
#include <asm/arch/davinci_misc.h> -#include <config.h>
/* SPI0 pin muxer settings */ extern const struct pinmux_config spi0_pins_base[3]; diff --git a/arch/arm/mach-exynos/exynos4_setup.h b/arch/arm/mach-exynos/exynos4_setup.h index fbb45eb897e3..23c9011fbc63 100644 --- a/arch/arm/mach-exynos/exynos4_setup.h +++ b/arch/arm/mach-exynos/exynos4_setup.h @@ -8,7 +8,6 @@ #ifndef _ORIGEN_SETUP_H #define _ORIGEN_SETUP_H
-#include <config.h> #include <asm/arch/cpu.h>
/* Bus Configuration Register Address */ diff --git a/arch/arm/mach-exynos/exynos5_setup.h b/arch/arm/mach-exynos/exynos5_setup.h index af7a5afb03cd..e9874a8c1b24 100644 --- a/arch/arm/mach-exynos/exynos5_setup.h +++ b/arch/arm/mach-exynos/exynos5_setup.h @@ -8,7 +8,6 @@ #ifndef _SMDK5250_SETUP_H #define _SMDK5250_SETUP_H
-#include <config.h> #include <asm/arch/dmc.h>
#define NOT_AVAILABLE 0 diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index fd400e7e3dd8..d5db805c62ba 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -6,6 +6,7 @@ * Lokesh Vutla lokeshvutla@ti.com */
+#include <config.h> #include <cpu_func.h> #include <image.h> #include <init.h> diff --git a/arch/arm/mach-k3/include/mach/clock.h b/arch/arm/mach-k3/include/mach/clock.h index 32368ce0ede3..866319365f0a 100644 --- a/arch/arm/mach-k3/include/mach/clock.h +++ b/arch/arm/mach-k3/include/mach/clock.h @@ -7,8 +7,6 @@ #ifndef __ASM_ARCH_CLOCK_H #define __ASM_ARCH_CLOCK_H
-#include <config.h> - /* Clock Defines */ #define V_OSCK 24000000 #define V_SCLK V_OSCK diff --git a/arch/arm/mach-k3/include/mach/j721e_hardware.h b/arch/arm/mach-k3/include/mach/j721e_hardware.h index 780341124a8f..0ba37c9ec7d1 100644 --- a/arch/arm/mach-k3/include/mach/j721e_hardware.h +++ b/arch/arm/mach-k3/include/mach/j721e_hardware.h @@ -7,7 +7,6 @@ #ifndef __ASM_ARCH_J721E_HARDWARE_H #define __ASM_ARCH_J721E_HARDWARE_H
-#include <config.h> #ifndef __ASSEMBLY__ #include <linux/bitops.h> #endif diff --git a/arch/arm/mach-k3/include/mach/j721s2_hardware.h b/arch/arm/mach-k3/include/mach/j721s2_hardware.h index ad4fcdd4a97f..5aa2282f59a3 100644 --- a/arch/arm/mach-k3/include/mach/j721s2_hardware.h +++ b/arch/arm/mach-k3/include/mach/j721s2_hardware.h @@ -7,7 +7,6 @@ #ifndef __ASM_ARCH_J721S2_HARDWARE_H #define __ASM_ARCH_J721S2_HARDWARE_H
-#include <config.h> #ifndef __ASSEMBLY__ #include <linux/bitops.h> #endif diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c index c6e7e2c3097d..d3b894c1b377 100644 --- a/arch/arm/mach-keystone/cmd_mon.c +++ b/arch/arm/mach-keystone/cmd_mon.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, <www.ti.com> */
+#include <config.h> #include <command.h> #include <image.h> #include <mach/mon.h> diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c index 2fece3a1b09b..e6033d251c56 100644 --- a/board/freescale/ls1088a/eth_ls1088aqds.c +++ b/board/freescale/ls1088a/eth_ls1088aqds.c @@ -3,6 +3,7 @@ * Copyright 2017 NXP */
+#include <config.h> #include <vsprintf.h> #include <linux/string.h> #include <asm/io.h> diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c index 048ab44c5919..b47e2ec5a793 100644 --- a/board/freescale/ls2080aqds/eth.c +++ b/board/freescale/ls2080aqds/eth.c @@ -3,6 +3,7 @@ * Copyright 2015 Freescale Semiconductor, Inc. */
+#include <config.h> #include <vsprintf.h> #include <linux/string.h> #include <asm/io.h> diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c index d09dda5bccc9..2718263eb19b 100644 --- a/board/toradex/verdin-am62/verdin-am62.c +++ b/board/toradex/verdin-am62/verdin-am62.c @@ -6,6 +6,7 @@ * */
+#include <config.h> #include <asm/arch/hardware.h> #include <asm/io.h> #include <dm/uclass.h> diff --git a/drivers/ddr/marvell/axp/ddr3_axp.h b/drivers/ddr/marvell/axp/ddr3_axp.h index c40cd768abf5..c3d282477f5c 100644 --- a/drivers/ddr/marvell/axp/ddr3_axp.h +++ b/drivers/ddr/marvell/axp/ddr3_axp.h @@ -6,6 +6,8 @@ #ifndef __DDR3_AXP_H #define __DDR3_AXP_H
+#include <config.h> + #define MV_78XX0_Z1_REV 0x0 #define MV_78XX0_A0_REV 0x1 #define MV_78XX0_B0_REV 0x2

On Thu, 14 Dec 2023 at 11:17, Tom Rini trini@konsulko.com wrote:
We need to include <config.h> directly when a file needs to have something such as CFG_SYS_SDRAM_SIZE referenced as this file is not automatically globally included and is most commonly indirectly included via common.h. Remove most cases of arm including config.h directly, but add it where needed. This includes a few board-specific fixes.
Signed-off-by: Tom Rini trini@konsulko.com
Changes in v2:
- Update arch/arm/mach-keystone/cmd_mon.c
arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h | 2 -- arch/arm/include/asm/arch-ls102xa/fsl_serdes.h | 2 -- arch/arm/include/asm/assembler.h | 1 - arch/arm/include/asm/secure.h | 1 - arch/arm/include/asm/string.h | 2 -- arch/arm/mach-davinci/include/mach/pinmux_defs.h | 1 - arch/arm/mach-exynos/exynos4_setup.h | 1 - arch/arm/mach-exynos/exynos5_setup.h | 1 - arch/arm/mach-k3/common.c | 1 + arch/arm/mach-k3/include/mach/clock.h | 2 -- arch/arm/mach-k3/include/mach/j721e_hardware.h | 1 - arch/arm/mach-k3/include/mach/j721s2_hardware.h | 1 - arch/arm/mach-keystone/cmd_mon.c | 1 + board/freescale/ls1088a/eth_ls1088aqds.c | 1 + board/freescale/ls2080aqds/eth.c | 1 + board/toradex/verdin-am62/verdin-am62.c | 1 + drivers/ddr/marvell/axp/ddr3_axp.h | 2 ++ 17 files changed, 7 insertions(+), 15 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

Remove and replace common.h and config.h in sandbox when it's not needed and add some explicit includes where needed.
Signed-off-by: Tom Rini trini@konsulko.com --- Changes in v2: - Drop <autoboot.h> from arch/sandbox/cpu/state.c as it's also not needed and leads to unrelated build failures with CMDLINE=n --- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 3 +-- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/sandbox/cpu/cache.c b/arch/sandbox/cpu/cache.c index 46c62c0b4461..c8a5e64214b6 100644 --- a/arch/sandbox/cpu/cache.c +++ b/arch/sandbox/cpu/cache.c @@ -3,7 +3,6 @@ * Copyright 2020, Heinrich Schuchardt xypron.glpk@gmx.de */
-#include <common.h> #include <cpu_func.h> #include <asm/state.h>
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index a1c5c7c4311a..d6475c969c4d 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -5,7 +5,6 @@
#define LOG_CATEGORY LOGC_SANDBOX
-#include <common.h> #include <bootstage.h> #include <cpu_func.h> #include <errno.h> diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index 590e406517bf..ed84646bdab7 100644 --- a/arch/sandbox/cpu/sdl.c +++ b/arch/sandbox/cpu/sdl.c @@ -72,7 +72,7 @@ static struct sdl_info { static void sandbox_sdl_poll_events(void) { /* - * We don't want to include common.h in this file since it uses + * We don't want to include cpu_func.h in this file since it uses * system headers. So add a declation here. */ extern void reset_cpu(void); diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 16b766279833..9ad9da686c6a 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -3,7 +3,6 @@ * Copyright (c) 2016 Google, Inc */
-#include <common.h> #include <dm.h> #include <hang.h> #include <handoff.h> diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 2589c2eba738..dce804165296 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -3,7 +3,7 @@ * Copyright (c) 2011-2012 The Chromium OS Authors. */
-#include <common.h> +#include <config.h> #include <cli.h> #include <command.h> #include <efi_loader.h> diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index e38bb248b7ff..a9ca79e76d2d 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -3,9 +3,8 @@ * Copyright (c) 2011-2012 The Chromium OS Authors. */
-#include <common.h> -#include <autoboot.h> #include <bloblist.h> +#include <config.h> #include <errno.h> #include <fdtdec.h> #include <log.h> diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 77a02e5f5241..3c0a102697ec 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -6,6 +6,8 @@ #ifndef __SANDBOX_ASM_IO_H #define __SANDBOX_ASM_IO_H
+#include <linux/types.h> + enum sandboxio_size_t { SB_SIZE_8, SB_SIZE_16, diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index 59a20595f51d..c84a1f7060f4 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -6,7 +6,6 @@ #ifndef __SANDBOX_STATE_H #define __SANDBOX_STATE_H
-#include <config.h> #include <sysreset.h> #include <stdbool.h> #include <linux/list.h> diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c index a748ba650b12..290db4521702 100644 --- a/arch/sandbox/lib/bootm.c +++ b/arch/sandbox/lib/bootm.c @@ -4,7 +4,6 @@ * Copyright (c) 2015 Sjoerd Simons sjoerd.simons@collabora.co.uk */
-#include <common.h> #include <bootstage.h> #include <image.h> #include <asm/io.h> diff --git a/arch/sandbox/lib/fdt_fixup.c b/arch/sandbox/lib/fdt_fixup.c index a646f2059c2c..e333bd52ea28 100644 --- a/arch/sandbox/lib/fdt_fixup.c +++ b/arch/sandbox/lib/fdt_fixup.c @@ -2,7 +2,6 @@
#define LOG_CATEGORY LOGC_ARCH
-#include <common.h> #include <fdt_support.h> #include <log.h>
diff --git a/arch/sandbox/lib/interrupts.c b/arch/sandbox/lib/interrupts.c index 4d7cbff802c6..3f6583e11f04 100644 --- a/arch/sandbox/lib/interrupts.c +++ b/arch/sandbox/lib/interrupts.c @@ -5,7 +5,6 @@ * found in the LICENSE file. */
-#include <common.h> #include <efi_loader.h> #include <irq_func.h> #include <os.h> diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c index 2038141947ab..6040eacb594f 100644 --- a/arch/sandbox/lib/pci_io.c +++ b/arch/sandbox/lib/pci_io.c @@ -8,7 +8,6 @@ * IO space access commands. */
-#include <common.h> #include <command.h> #include <dm.h> #include <log.h> diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 9d58860451c5..802596569c64 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -3,8 +3,8 @@ * Copyright (c) 2011 The Chromium OS Authors. */
-#include <common.h> #include <addr_map.h> +#include <config.h> #include <cpu_func.h> #include <cros_ec.h> #include <dm.h>

On Thu, 14 Dec 2023 at 11:17, Tom Rini trini@konsulko.com wrote:
Remove and replace common.h and config.h in sandbox when it's not needed and add some explicit includes where needed.
Signed-off-by: Tom Rini trini@konsulko.com
Changes in v2:
- Drop <autoboot.h> from arch/sandbox/cpu/state.c as it's also not needed and leads to unrelated build failures with CMDLINE=n
arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 3 +-- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 13 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

In order to make it easier to move on to dropping common.h from code directly, remove common.h inclusion from the rest of the header file which had been including it.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- board/BuR/common/br_resetc.h | 1 - board/CZ.NIC/turris_mox/mox_sp.h | 2 -- board/freescale/common/vsc3316_3308.h | 1 - board/ti/ks2_evm/mux-k2g.h | 1 - board/tq/tqma6/tqma6_bb.h | 2 -- board/xilinx/zynqmp/xil_io.h | 1 - disk/part_amiga.h | 1 - drivers/bios_emulator/include/x86emu.h | 1 - drivers/crypto/fsl/jobdesc.h | 1 - drivers/crypto/fsl/rsa_caam.h | 2 -- drivers/ddr/altera/sdram_soc64.h | 1 - drivers/ddr/marvell/a38x/ddr_ml_wrapper.h | 1 - drivers/net/fm/fm.h | 1 - drivers/net/fsl-mc/dpio/qbman_private.h | 1 - drivers/net/fsl-mc/dpio/qbman_sys.h | 1 + drivers/net/mscc_eswitch/mscc_mac_table.c | 1 + drivers/net/mscc_eswitch/mscc_mac_table.h | 2 -- drivers/net/mscc_eswitch/mscc_xfer.c | 1 + drivers/net/mscc_eswitch/mscc_xfer.h | 2 -- drivers/pci/pcie_layerscape_fixup_common.h | 2 -- drivers/pci_endpoint/pcie-cadence.h | 1 - drivers/pinctrl/mtmips/pinctrl-mtmips-common.h | 2 -- drivers/usb/gadget/bcm_udc_otg.h | 2 -- fs/btrfs/ctree.h | 1 - fs/yaffs2/ydirectenv.h | 1 - lib/libavb/avb_sysdeps.h | 4 +++- lib/zlib/zlib.h | 1 - net/arp.h | 2 -- net/link_local.h | 5 +---- net/net_rand.h | 1 - net/ping.h | 1 - 31 files changed, 7 insertions(+), 40 deletions(-)
diff --git a/board/BuR/common/br_resetc.h b/board/BuR/common/br_resetc.h index ba0689bf2050..999045b867d2 100644 --- a/board/BuR/common/br_resetc.h +++ b/board/BuR/common/br_resetc.h @@ -7,7 +7,6 @@ */ #ifndef __CONFIG_BRRESETC_H__ #define __CONFIG_BRRESETC_H__ -#include <common.h>
int br_resetc_regget(u8 reg, u8 *dst); int br_resetc_regset(u8 reg, u8 val); diff --git a/board/CZ.NIC/turris_mox/mox_sp.h b/board/CZ.NIC/turris_mox/mox_sp.h index 720880d5df32..c766c7423ac5 100644 --- a/board/CZ.NIC/turris_mox/mox_sp.h +++ b/board/CZ.NIC/turris_mox/mox_sp.h @@ -6,8 +6,6 @@ #ifndef _BOARD_CZNIC_TURRIS_MOX_MOX_SP_H_ #define _BOARD_CZNIC_TURRIS_MOX_MOX_SP_H_
-#include <common.h> - enum cznic_a3720_board { BOARD_UNDEFINED = 0x0, BOARD_TURRIS_MOX = 0x1, diff --git a/board/freescale/common/vsc3316_3308.h b/board/freescale/common/vsc3316_3308.h index 8d343ba4d654..9725d6d9e390 100644 --- a/board/freescale/common/vsc3316_3308.h +++ b/board/freescale/common/vsc3316_3308.h @@ -6,7 +6,6 @@ #ifndef __VSC_CROSSBAR_H_ #define __VSC_CROSSBAR_H_
-#include <common.h> #include <i2c.h> #include <errno.h>
diff --git a/board/ti/ks2_evm/mux-k2g.h b/board/ti/ks2_evm/mux-k2g.h index f24e62850b8b..447e70607f96 100644 --- a/board/ti/ks2_evm/mux-k2g.h +++ b/board/ti/ks2_evm/mux-k2g.h @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */
-#include <common.h> #include <hang.h> #include <asm/io.h> #include <asm/arch/mux-k2g.h> diff --git a/board/tq/tqma6/tqma6_bb.h b/board/tq/tqma6/tqma6_bb.h index ca81bdf58535..a2f871af1f83 100644 --- a/board/tq/tqma6/tqma6_bb.h +++ b/board/tq/tqma6/tqma6_bb.h @@ -7,8 +7,6 @@ #ifndef __TQMA6_BB__ #define __TQMA6_BB__
-#include <common.h> - int tqma6_bb_board_mmc_getwp(struct mmc *mmc); int tqma6_bb_board_mmc_getcd(struct mmc *mmc); int tqma6_bb_board_mmc_init(struct bd_info *bis); diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h index e6caa7c85033..dd823d6f62a5 100644 --- a/board/xilinx/zynqmp/xil_io.h +++ b/board/xilinx/zynqmp/xil_io.h @@ -5,7 +5,6 @@
/* FIXME remove this when vivado is fixed */ #include <asm/io.h> -#include <common.h> #include <linux/delay.h>
#define xil_printf(...) diff --git a/disk/part_amiga.h b/disk/part_amiga.h index 42f5eb0f941c..dfa70bdb8a8c 100644 --- a/disk/part_amiga.h +++ b/disk/part_amiga.h @@ -7,7 +7,6 @@
#ifndef _DISK_PART_AMIGA_H #define _DISK_PART_AMIGA_H -#include <common.h>
#if CONFIG_IS_ENABLED(ISO_PARTITION) /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS diff --git a/drivers/bios_emulator/include/x86emu.h b/drivers/bios_emulator/include/x86emu.h index b28cdc6b8cad..d2650a8d1600 100644 --- a/drivers/bios_emulator/include/x86emu.h +++ b/drivers/bios_emulator/include/x86emu.h @@ -42,7 +42,6 @@ #define __X86EMU_X86EMU_H
#include <asm/types.h> -#include <common.h> #include <pci.h> #include <asm/io.h> #define X86API diff --git a/drivers/crypto/fsl/jobdesc.h b/drivers/crypto/fsl/jobdesc.h index c4501abd26b2..69adfdca95b5 100644 --- a/drivers/crypto/fsl/jobdesc.h +++ b/drivers/crypto/fsl/jobdesc.h @@ -7,7 +7,6 @@ #ifndef __JOBDESC_H #define __JOBDESC_H
-#include <common.h> #include <asm/io.h> #include "rsa_caam.h"
diff --git a/drivers/crypto/fsl/rsa_caam.h b/drivers/crypto/fsl/rsa_caam.h index 9a6a8afa4aa7..fb132a3d1814 100644 --- a/drivers/crypto/fsl/rsa_caam.h +++ b/drivers/crypto/fsl/rsa_caam.h @@ -6,8 +6,6 @@ #ifndef __RSA_CAAM_H #define __RSA_CAAM_H
-#include <common.h> - /** * struct pk_in_params - holder for input to PKHA block in CAAM * These parameters are required to perform Modular Exponentiation diff --git a/drivers/ddr/altera/sdram_soc64.h b/drivers/ddr/altera/sdram_soc64.h index 07a0f9f2ae9b..87a70a861baa 100644 --- a/drivers/ddr/altera/sdram_soc64.h +++ b/drivers/ddr/altera/sdram_soc64.h @@ -6,7 +6,6 @@ #ifndef _SDRAM_SOC64_H_ #define _SDRAM_SOC64_H_
-#include <common.h> #include <linux/sizes.h>
struct altera_sdram_priv { diff --git a/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h b/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h index 735731196589..dff56338b19e 100644 --- a/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h +++ b/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h @@ -6,7 +6,6 @@ #ifndef _DDR_ML_WRAPPER_H #define _DDR_ML_WRAPPER_H
-#include <common.h> #include <i2c.h> #include <spl.h> #include <asm/io.h> diff --git a/drivers/net/fm/fm.h b/drivers/net/fm/fm.h index a2d5b03429ab..5c45ad56d0a5 100644 --- a/drivers/net/fm/fm.h +++ b/drivers/net/fm/fm.h @@ -6,7 +6,6 @@ #ifndef __FM_H__ #define __FM_H__
-#include <common.h> #include <phy.h> #include <fm_eth.h> #include <fsl_fman.h> diff --git a/drivers/net/fsl-mc/dpio/qbman_private.h b/drivers/net/fsl-mc/dpio/qbman_private.h index 53f1300eaf80..f9dad178075f 100644 --- a/drivers/net/fsl-mc/dpio/qbman_private.h +++ b/drivers/net/fsl-mc/dpio/qbman_private.h @@ -4,7 +4,6 @@ */
/* Perform extra checking */ -#include <common.h> #include <errno.h> #include <asm/io.h> #include <linux/bug.h> diff --git a/drivers/net/fsl-mc/dpio/qbman_sys.h b/drivers/net/fsl-mc/dpio/qbman_sys.h index 1c6e48913028..cac70a1291c7 100644 --- a/drivers/net/fsl-mc/dpio/qbman_sys.h +++ b/drivers/net/fsl-mc/dpio/qbman_sys.h @@ -20,6 +20,7 @@
/* Trace the 3 different classes of read/write access to QBMan. #undef as * required. */ +#include <config.h> #include <linux/bug.h> #include <linux/printk.h> #undef QBMAN_CCSR_TRACE diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.c b/drivers/net/mscc_eswitch/mscc_mac_table.c index 25b9cad42c97..06e1f625fb74 100644 --- a/drivers/net/mscc_eswitch/mscc_mac_table.c +++ b/drivers/net/mscc_eswitch/mscc_mac_table.c @@ -3,6 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */
+#include <errno.h> #include <linux/bitops.h> #include <linux/io.h> #include "mscc_mac_table.h" diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.h b/drivers/net/mscc_eswitch/mscc_mac_table.h index 17fed2e79253..5ec8db25417d 100644 --- a/drivers/net/mscc_eswitch/mscc_mac_table.h +++ b/drivers/net/mscc_eswitch/mscc_mac_table.h @@ -3,8 +3,6 @@ * Copyright (c) 2018 Microsemi Corporation */
-#include <common.h> - #define ETH_LEN 6 #define MAC_VID 1
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c index 6f7474645717..ee6bf065d3a8 100644 --- a/drivers/net/mscc_eswitch/mscc_xfer.c +++ b/drivers/net/mscc_eswitch/mscc_xfer.c @@ -3,6 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */
+#include <errno.h> #include <log.h> #include <linux/bitops.h> #include <linux/delay.h> diff --git a/drivers/net/mscc_eswitch/mscc_xfer.h b/drivers/net/mscc_eswitch/mscc_xfer.h index c880a4e7e6a6..70f279401e19 100644 --- a/drivers/net/mscc_eswitch/mscc_xfer.h +++ b/drivers/net/mscc_eswitch/mscc_xfer.h @@ -3,8 +3,6 @@ * Copyright (c) 2018 Microsemi Corporation */
-#include <common.h> - enum mscc_regs_qs { MSCC_QS_XTR_RD, MSCC_QS_XTR_FLUSH, diff --git a/drivers/pci/pcie_layerscape_fixup_common.h b/drivers/pci/pcie_layerscape_fixup_common.h index 70bd3f0cba31..3255b7648c0a 100644 --- a/drivers/pci/pcie_layerscape_fixup_common.h +++ b/drivers/pci/pcie_layerscape_fixup_common.h @@ -9,8 +9,6 @@ #ifndef _PCIE_LAYERSCAPE_FIXUP_COMMON_H_ #define _PCIE_LAYERSCAPE_FIXUP_COMMON_H_
-#include <common.h> - void ft_pci_setup_ls(void *blob, struct bd_info *bd);
#ifdef CONFIG_PCIE_LAYERSCAPE_GEN4 diff --git a/drivers/pci_endpoint/pcie-cadence.h b/drivers/pci_endpoint/pcie-cadence.h index 8a659c36aa24..dd0101a33af9 100644 --- a/drivers/pci_endpoint/pcie-cadence.h +++ b/drivers/pci_endpoint/pcie-cadence.h @@ -11,7 +11,6 @@ #ifndef PCIE_CADENCE_H #define PCIE_CADENCE_H
-#include <common.h> #include <pci_ep.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h index 1f1023ef4213..7a38f8d87532 100644 --- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h +++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h @@ -8,8 +8,6 @@ #ifndef _PINCTRL_MTMIPS_COMMON_H_ #define _PINCTRL_MTMIPS_COMMON_H_
-#include <common.h> - struct mtmips_pmx_func { const char *name; int value; diff --git a/drivers/usb/gadget/bcm_udc_otg.h b/drivers/usb/gadget/bcm_udc_otg.h index 24cc936c6b48..48370f37d8a2 100644 --- a/drivers/usb/gadget/bcm_udc_otg.h +++ b/drivers/usb/gadget/bcm_udc_otg.h @@ -6,8 +6,6 @@ #ifndef __BCM_UDC_OTG_H #define __BCM_UDC_OTG_H
-#include <common.h> - static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask) { writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr)); diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ffd095ffdd2e..59439552a45c 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -9,7 +9,6 @@ #ifndef __BTRFS_CTREE_H__ #define __BTRFS_CTREE_H__
-#include <common.h> #include <compiler.h> #include <linux/rbtree.h> #include <linux/bug.h> diff --git a/fs/yaffs2/ydirectenv.h b/fs/yaffs2/ydirectenv.h index d274f22e84d0..790f8512f742 100644 --- a/fs/yaffs2/ydirectenv.h +++ b/fs/yaffs2/ydirectenv.h @@ -20,7 +20,6 @@ #ifndef __YDIRECTENV_H__ #define __YDIRECTENV_H__
-#include <common.h> #include <malloc.h> #include <linux/compat.h>
diff --git a/lib/libavb/avb_sysdeps.h b/lib/libavb/avb_sysdeps.h index f52428cc622f..aece8e0a0180 100644 --- a/lib/libavb/avb_sysdeps.h +++ b/lib/libavb/avb_sysdeps.h @@ -19,7 +19,9 @@ extern "C" { * like uint8_t, uint64_t, and bool (with |false|, |true| keywords) * must be present. */ -#include <common.h> +#include <stdio.h> +#include <stdbool.h> +#include <linux/types.h>
/* If you don't have gcc or clang, these attribute macros may need to * be adjusted. diff --git a/lib/zlib/zlib.h b/lib/zlib/zlib.h index af3703e6d770..560e7be97d3a 100644 --- a/lib/zlib/zlib.h +++ b/lib/zlib/zlib.h @@ -2,7 +2,6 @@ #ifndef __GLUE_ZLIB_H__ #define __GLUE_ZLIB_H__
-#include <common.h> #include <linux/compiler.h> #include <asm/unaligned.h> #include <watchdog.h> diff --git a/net/arp.h b/net/arp.h index 25b3c00d5c56..c50885fb9a57 100644 --- a/net/arp.h +++ b/net/arp.h @@ -12,8 +12,6 @@ #ifndef __ARP_H__ #define __ARP_H__
-#include <common.h> - extern struct in_addr net_arp_wait_packet_ip; /* MAC address of waiting packet's destination */ extern uchar *arp_wait_packet_ethaddr; diff --git a/net/link_local.h b/net/link_local.h index bb998164df9b..d8701255142f 100644 --- a/net/link_local.h +++ b/net/link_local.h @@ -10,15 +10,12 @@ * Licensed under the GPL v2 or later */
-#if defined(CONFIG_CMD_LINK_LOCAL) - #ifndef __LINK_LOCAL_H__ #define __LINK_LOCAL_H__
-#include <common.h> +struct arp_hdr;
void link_local_receive_arp(struct arp_hdr *arp, int len); void link_local_start(void);
#endif /* __LINK_LOCAL_H__ */ -#endif diff --git a/net/net_rand.h b/net/net_rand.h index 6a52cda85e03..d3c5559adfd4 100644 --- a/net/net_rand.h +++ b/net/net_rand.h @@ -9,7 +9,6 @@ #ifndef __NET_RAND_H__ #define __NET_RAND_H__
-#include <common.h> #include <dm/uclass.h> #include <rng.h>
diff --git a/net/ping.h b/net/ping.h index 7b6f4e566dbd..76ac225fc075 100644 --- a/net/ping.h +++ b/net/ping.h @@ -12,7 +12,6 @@ #ifndef __PING_H__ #define __PING_H__
-#include <common.h> #include <net.h>
/*

These files include <common.h> twice. Start by removing the second inclusion of the file.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- board/data_modul/common/common.c | 1 - board/grinn/liteboard/board.c | 1 - board/toradex/colibri_imx7/colibri_imx7.c | 1 - board/wandboard/wandboard.c | 1 - drivers/gpio/gpio-aspeed.c | 1 - drivers/spi/fsl_dspi.c | 1 - drivers/video/exynos/exynos_dp.c | 1 - 7 files changed, 7 deletions(-)
diff --git a/board/data_modul/common/common.c b/board/data_modul/common/common.c index bf9a11472d11..4f308dad2e4d 100644 --- a/board/data_modul/common/common.c +++ b/board/data_modul/common/common.c @@ -12,7 +12,6 @@ #include <asm/io.h> #include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/iomux-v3.h> -#include <common.h> #include <dm/uclass.h> #include <hang.h> #include <i2c_eeprom.h> diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 48392c48e5cc..cf1d7cee9252 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -20,7 +20,6 @@ #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/boot_mode.h> #include <asm/io.h> -#include <common.h> #include <env.h> #include <fsl_esdhc_imx.h> #include <linux/sizes.h> diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index e23f9af20da0..1d0c157d5394 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -16,7 +16,6 @@ #include <asm/gpio.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <dm.h> #include <dm/platform_data/serial_mxc.h> #include <fdt_support.h> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 48914450a294..8be62c86695d 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -28,7 +28,6 @@ #include <env.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> #include <miiphy.h> #include <netdev.h> #include <phy.h> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index 2c5415c671d1..1c3d18796b3a 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -11,7 +11,6 @@ #include <asm/gpio.h>
#include <config.h> -#include <common.h> #include <clk.h> #include <dm.h> #include <asm/io.h> diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c index 89907cbbb02a..9b3d5a94817f 100644 --- a/drivers/spi/fsl_dspi.c +++ b/drivers/spi/fsl_dspi.c @@ -14,7 +14,6 @@ #include <common.h> #include <dm.h> #include <errno.h> -#include <common.h> #include <log.h> #include <spi.h> #include <malloc.h> diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c index a532d5ae1abb..59838da6c926 100644 --- a/drivers/video/exynos/exynos_dp.c +++ b/drivers/video/exynos/exynos_dp.c @@ -7,7 +7,6 @@
#include <common.h> #include <dm.h> -#include <common.h> #include <display.h> #include <fdtdec.h> #include <log.h>

We need and include <linux/types.h> and this in turn already includes <asm/types.h>, so drop it here.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- arch/arm/include/asm/global_data.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 75bd9d56f893..2bb978d66839 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -11,7 +11,6 @@
#include <config.h>
-#include <asm/types.h> #include <linux/types.h>
/* Architecture-specific global data */

We need <linux/types.h> in these files as we reference Linux types.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- arch/sandbox/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h index c6977735029d..001b2b53c1c8 100644 --- a/arch/sandbox/include/asm/global_data.h +++ b/arch/sandbox/include/asm/global_data.h @@ -9,6 +9,8 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H
+#include <linux/types.h> + /* Architecture-specific global data */ struct arch_global_data { uint8_t *ram_buf; /* emulated RAM buffer */

In the architecture global data, replace the one case of u32 with unsigned long. Now, we can drop config.h here but then do need to add it in two m68k-centric spaces.
Signed-off-by: Tom Rini trini@konsulko.com Acked-by: Angelo Dureghello angelo@kernel-space.org --- arch/m68k/include/asm/cache.h | 2 ++ arch/m68k/include/asm/global_data.h | 4 +--- arch/m68k/lib/traps.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h index 8ed2b4dbab47..6ef7f7be1af8 100644 --- a/arch/m68k/include/asm/cache.h +++ b/arch/m68k/include/asm/cache.h @@ -9,6 +9,8 @@ #ifndef __CACHE_H #define __CACHE_H
+#include <config.h> + #if defined(CONFIG_MCF520x) || defined(CONFIG_MCF523x) || \ defined(CONFIG_MCF52x2) #define CFG_CF_V2 diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index 5f576ba16f9a..c2ef5770a3df 100644 --- a/arch/m68k/include/asm/global_data.h +++ b/arch/m68k/include/asm/global_data.h @@ -7,8 +7,6 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H
-#include <config.h> - /* Architecture-specific global data */ struct arch_global_data { #ifdef CONFIG_SYS_I2C_FSL @@ -24,7 +22,7 @@ struct arch_global_data { unsigned long sdhc_clk; #endif #if defined(CONFIG_FSL_ESDHC) - u32 sdhc_per_clk; + unsigned long sdhc_per_clk; #endif };
diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c index c283351181d8..2a025c5a6e86 100644 --- a/arch/m68k/lib/traps.c +++ b/arch/m68k/lib/traps.c @@ -7,6 +7,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */
+#include <config.h> #include <init.h> #include <watchdog.h> #include <command.h>

In most cases, the architecture global data currently makes use of assorted linux types, but does not include <linux/types.h> to provide them. Add <linux/types.h> instead of relying on indirect inclusion.
Signed-off-by: Tom Rini trini@konsulko.com --- Changes in v2: - Update include/system-constraints.h and board/cssi/cmpc885/sdram.c --- arch/mips/include/asm/global_data.h | 2 +- arch/nios2/include/asm/global_data.h | 2 ++ arch/powerpc/include/asm/global_data.h | 1 - arch/riscv/include/asm/global_data.h | 1 + arch/x86/include/asm/global_data.h | 1 + board/cssi/cmpc885/sdram.c | 1 + include/system-constants.h | 2 ++ 7 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h index f0d3b07bf1eb..34b7e0bed945 100644 --- a/arch/mips/include/asm/global_data.h +++ b/arch/mips/include/asm/global_data.h @@ -7,8 +7,8 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H
+#include <linux/types.h> #include <asm/regdef.h> -#include <asm/types.h>
struct octeon_eeprom_mac_addr { u8 mac_addr_base[6]; diff --git a/arch/nios2/include/asm/global_data.h b/arch/nios2/include/asm/global_data.h index 1a0e7d25fa3b..b56e8a5078e0 100644 --- a/arch/nios2/include/asm/global_data.h +++ b/arch/nios2/include/asm/global_data.h @@ -6,6 +6,8 @@ #ifndef __ASM_NIOS2_GLOBALDATA_H_ #define __ASM_NIOS2_GLOBALDATA_H_
+#include <linux/types.h> + /* Architecture-specific global data */ struct arch_global_data { u32 dcache_line_size; diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 43d71f5caec0..f7860122a00b 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -8,7 +8,6 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H
-#include <config.h> #include <linux/types.h>
/* Architecture-specific global data */ diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h index 937fa4d15446..d00247ad9536 100644 --- a/arch/riscv/include/asm/global_data.h +++ b/arch/riscv/include/asm/global_data.h @@ -10,6 +10,7 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H
+#include <linux/types.h> #include <asm/smp.h> #include <asm/u-boot.h> #include <compiler.h> diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 6f4a7130f1da..1ef7f1f0349e 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -9,6 +9,7 @@
#ifndef __ASSEMBLY__
+#include <linux/types.h> #include <asm/processor.h> #include <asm/mrccache.h>
diff --git a/board/cssi/cmpc885/sdram.c b/board/cssi/cmpc885/sdram.c index 11a50c3a52d6..828784bd368e 100644 --- a/board/cssi/cmpc885/sdram.c +++ b/board/cssi/cmpc885/sdram.c @@ -4,6 +4,7 @@ * Charles Frey charles.frey@c-s.fr */
+#include <config.h> #include <linux/sizes.h> #include <linux/delay.h> #include <init.h> diff --git a/include/system-constants.h b/include/system-constants.h index d688629f119b..e09fc418a47c 100644 --- a/include/system-constants.h +++ b/include/system-constants.h @@ -3,6 +3,8 @@ #ifndef __SYSTEM_CONSTANTS_H__ #define __SYSTEM_CONSTANTS_H__
+#include <config.h> + /* * The most common case for our initial stack pointer address is to * say that we have defined a static intiial ram address location and

On Thu, 14 Dec 2023 at 11:18, Tom Rini trini@konsulko.com wrote:
In most cases, the architecture global data currently makes use of assorted linux types, but does not include <linux/types.h> to provide them. Add <linux/types.h> instead of relying on indirect inclusion.
Signed-off-by: Tom Rini trini@konsulko.com
Changes in v2:
- Update include/system-constraints.h and board/cssi/cmpc885/sdram.c
arch/mips/include/asm/global_data.h | 2 +- arch/nios2/include/asm/global_data.h | 2 ++ arch/powerpc/include/asm/global_data.h | 1 - arch/riscv/include/asm/global_data.h | 1 + arch/x86/include/asm/global_data.h | 1 + board/cssi/cmpc885/sdram.c | 1 + include/system-constants.h | 2 ++ 7 files changed, 8 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

Cleanup the list of headers we include here. For the tools build we only need to exclude <cyclic.h> as that's used by the target build for the prototype for schedule(), and we don't need to get that via <watchdog.h>. We can also make use of our <string.h> intentionally existing as a redirection to <linux/string.h> to reduce ifdef'd lines.
Signed-off-by: Tom Rini trini@konsulko.com --- lib/sha1.c | 7 ++----- lib/sha256.c | 7 ++----- lib/sha512.c | 6 +----- 3 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/lib/sha1.c b/lib/sha1.c index 8d0740789349..7ef536f4b5db 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -17,12 +17,9 @@ #endif
#ifndef USE_HOSTCC -#include <common.h> -#include <linux/string.h> -#else -#include <string.h> +#include <cyclic.h> #endif /* USE_HOSTCC */ -#include <watchdog.h> +#include <string.h> #include <u-boot/sha1.h>
#include <linux/compiler_attributes.h> diff --git a/lib/sha256.c b/lib/sha256.c index 4d26aea1c8ce..665ba6f152e5 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -6,12 +6,9 @@ */
#ifndef USE_HOSTCC -#include <common.h> -#include <linux/string.h> -#else -#include <string.h> +#include <cyclic.h> #endif /* USE_HOSTCC */ -#include <watchdog.h> +#include <string.h> #include <u-boot/sha256.h>
#include <linux/compiler_attributes.h> diff --git a/lib/sha512.c b/lib/sha512.c index fbe8d5f5bfe9..ffe2c5cd9642 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -11,13 +11,9 @@ */
#ifndef USE_HOSTCC -#include <common.h> -#include <linux/string.h> -#else -#include <string.h> +#include <cyclic.h> #endif /* USE_HOSTCC */ #include <compiler.h> -#include <watchdog.h> #include <u-boot/sha512.h>
const uint8_t sha384_der_prefix[SHA384_DER_LEN] = {

On Thu, 14 Dec 2023 at 11:18, Tom Rini trini@konsulko.com wrote:
Cleanup the list of headers we include here. For the tools build we only need to exclude <cyclic.h> as that's used by the target build for the prototype for schedule(), and we don't need to get that via <watchdog.h>. We can also make use of our <string.h> intentionally existing as a redirection to <linux/string.h> to reduce ifdef'd lines.
Signed-off-by: Tom Rini trini@konsulko.com
lib/sha1.c | 7 ++----- lib/sha256.c | 7 ++----- lib/sha512.c | 6 +----- 3 files changed, 5 insertions(+), 15 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

In order for RMOBILE_CPU_TYPE_R9A07G044L to be defined we need to include <mach/rmobile.h> here.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Marek Vasut marek.vasut+renesas@mailbox.org --- arch/arm/mach-rmobile/cpu_info-rzg2l.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-rmobile/cpu_info-rzg2l.c b/arch/arm/mach-rmobile/cpu_info-rzg2l.c index f69649dc7eaf..bd3146fb011f 100644 --- a/arch/arm/mach-rmobile/cpu_info-rzg2l.c +++ b/arch/arm/mach-rmobile/cpu_info-rzg2l.c @@ -4,6 +4,7 @@ * */
+#include <mach/rmobile.h> #include <asm/io.h> #include <linux/libfdt.h>

We largely do not need <common.h> in these files, so drop it. The only exception here is that efi_freestanding.c needs <linux/types.h> and had been getting that via <common.h>.
Signed-off-by: Tom Rini trini@konsulko.com --- lib/efi_loader/dtbdump.c | 1 - lib/efi_loader/efi_acpi.c | 1 - lib/efi_loader/efi_bootmgr.c | 1 - lib/efi_loader/efi_boottime.c | 1 - lib/efi_loader/efi_capsule.c | 1 - lib/efi_loader/efi_conformance.c | 1 - lib/efi_loader/efi_console.c | 1 - lib/efi_loader/efi_device_path.c | 1 - lib/efi_loader/efi_device_path_to_text.c | 1 - lib/efi_loader/efi_device_path_utilities.c | 1 - lib/efi_loader/efi_disk.c | 1 - lib/efi_loader/efi_dt_fixup.c | 1 - lib/efi_loader/efi_esrt.c | 1 - lib/efi_loader/efi_file.c | 1 - lib/efi_loader/efi_firmware.c | 1 - lib/efi_loader/efi_freestanding.c | 2 +- lib/efi_loader/efi_gop.c | 1 - lib/efi_loader/efi_helper.c | 1 - lib/efi_loader/efi_hii.c | 1 - lib/efi_loader/efi_hii_config.c | 1 - lib/efi_loader/efi_image_loader.c | 1 - lib/efi_loader/efi_load_initrd.c | 1 - lib/efi_loader/efi_load_options.c | 1 - lib/efi_loader/efi_memory.c | 1 - lib/efi_loader/efi_net.c | 1 - lib/efi_loader/efi_riscv.c | 1 - lib/efi_loader/efi_rng.c | 1 - lib/efi_loader/efi_root_node.c | 1 - lib/efi_loader/efi_runtime.c | 1 - lib/efi_loader/efi_setup.c | 1 - lib/efi_loader/efi_signature.c | 1 - lib/efi_loader/efi_smbios.c | 1 - lib/efi_loader/efi_string.c | 1 - lib/efi_loader/efi_tcg2.c | 1 - lib/efi_loader/efi_unicode_collation.c | 1 - lib/efi_loader/efi_var_common.c | 1 - lib/efi_loader/efi_var_file.c | 1 - lib/efi_loader/efi_var_mem.c | 1 - lib/efi_loader/efi_variable.c | 1 - lib/efi_loader/efi_variable_tee.c | 1 - lib/efi_loader/efi_watchdog.c | 1 - lib/efi_loader/initrddump.c | 1 - 42 files changed, 1 insertion(+), 42 deletions(-)
diff --git a/lib/efi_loader/dtbdump.c b/lib/efi_loader/dtbdump.c index 3ce2a07f9eb0..5f39cf22da79 100644 --- a/lib/efi_loader/dtbdump.c +++ b/lib/efi_loader/dtbdump.c @@ -6,7 +6,6 @@ * to a file. */
-#include <common.h> #include <efi_api.h> #include <efi_dt_fixup.h> #include <part.h> diff --git a/lib/efi_loader/efi_acpi.c b/lib/efi_loader/efi_acpi.c index f755af76f866..67bbd2a01c0b 100644 --- a/lib/efi_loader/efi_acpi.c +++ b/lib/efi_loader/efi_acpi.c @@ -5,7 +5,6 @@ * Copyright (C) 2018, Bin Meng bmeng.cn@gmail.com */
-#include <common.h> #include <efi_loader.h> #include <log.h> #include <mapmem.h> diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index 48153bd5ffbb..4e42a8d694fd 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -9,7 +9,6 @@
#include <blk.h> #include <blkmap.h> -#include <common.h> #include <charset.h> #include <dm.h> #include <log.h> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 3767fa2db429..7c5b5abb187e 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -5,7 +5,6 @@ * Copyright (c) 2016 Alexander Graf */
-#include <common.h> #include <bootm.h> #include <div64.h> #include <dm/device.h> diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index af8a2ee940ce..de0d49ebebda 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -8,7 +8,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <env.h> diff --git a/lib/efi_loader/efi_conformance.c b/lib/efi_loader/efi_conformance.c index 0ca26f57a7f2..167067e26cd1 100644 --- a/lib/efi_loader/efi_conformance.c +++ b/lib/efi_loader/efi_conformance.c @@ -5,7 +5,6 @@ * Copyright (C) 2022 Arm Ltd. */
-#include <common.h> #include <efi_loader.h> #include <log.h> #include <efi_api.h> diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index a2d137d7a9e1..03dece51aeaa 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -8,7 +8,6 @@ #define LOG_CATEGORY LOGC_EFI
#include <ansi.h> -#include <common.h> #include <charset.h> #include <malloc.h> #include <time.h> diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index ed7214f3a347..8dbd8105ae26 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <blk.h> #include <dm.h> #include <dm/root.h> diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c index 8c76d8be605d..0c7b30a26e7e 100644 --- a/lib/efi_loader/efi_device_path_to_text.c +++ b/lib/efi_loader/efi_device_path_to_text.c @@ -5,7 +5,6 @@ * Copyright (c) 2017 Heinrich Schuchardt */
-#include <common.h> #include <blk.h> #include <efi_loader.h> #include <malloc.h> diff --git a/lib/efi_loader/efi_device_path_utilities.c b/lib/efi_loader/efi_device_path_utilities.c index a07d9bab3a3c..844d8acd67c0 100644 --- a/lib/efi_loader/efi_device_path_utilities.c +++ b/lib/efi_loader/efi_device_path_utilities.c @@ -5,7 +5,6 @@ * Copyright (c) 2017 Leif Lindholm */
-#include <common.h> #include <efi_loader.h>
const efi_guid_t efi_guid_device_path_utilities_protocol = diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index b808a7fe627d..ed997008c4ed 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <blk.h> #include <dm.h> #include <dm/device-internal.h> diff --git a/lib/efi_loader/efi_dt_fixup.c b/lib/efi_loader/efi_dt_fixup.c index a0c889cf9867..9886e6897cd0 100644 --- a/lib/efi_loader/efi_dt_fixup.c +++ b/lib/efi_loader/efi_dt_fixup.c @@ -5,7 +5,6 @@ * Copyright (c) 2020 Heinrich Schuchardt */
-#include <common.h> #include <efi_dt_fixup.h> #include <efi_loader.h> #include <efi_rng.h> diff --git a/lib/efi_loader/efi_esrt.c b/lib/efi_loader/efi_esrt.c index 7f46d651e6f2..dafd447b6d76 100644 --- a/lib/efi_loader/efi_esrt.c +++ b/lib/efi_loader/efi_esrt.c @@ -5,7 +5,6 @@ * Copyright (C) 2021 Arm Ltd. */
-#include <common.h> #include <efi_loader.h> #include <log.h> #include <efi_api.h> diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index 3c56cebf9653..222001d6a3b5 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -5,7 +5,6 @@ * Copyright (c) 2017 Rob Clark */
-#include <common.h> #include <charset.h> #include <efi_loader.h> #include <log.h> diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c index 9abb29f1dff1..1fde1885e3ca 100644 --- a/lib/efi_loader/efi_firmware.c +++ b/lib/efi_loader/efi_firmware.c @@ -6,7 +6,6 @@ * Author: AKASHI Takahiro */
-#include <common.h> #include <charset.h> #include <dfu.h> #include <efi_loader.h> diff --git a/lib/efi_loader/efi_freestanding.c b/lib/efi_loader/efi_freestanding.c index 4b65fc64dd04..b2786095c323 100644 --- a/lib/efi_loader/efi_freestanding.c +++ b/lib/efi_loader/efi_freestanding.c @@ -8,7 +8,7 @@ * memset(), and memcmp(). */
-#include <common.h> +#include <linux/types.h>
/** * memcmp() - compare memory areas diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index a09db31eb465..41e12fa72460 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -5,7 +5,6 @@ * Copyright (c) 2016 Alexander Graf */
-#include <common.h> #include <dm.h> #include <efi_loader.h> #include <log.h> diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index cdfd16ea7742..17f27ca1a0b2 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -4,7 +4,6 @@ */
#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <env.h> #include <malloc.h> #include <dm.h> diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c index 3b54ecb11ac1..74e402df1b8a 100644 --- a/lib/efi_loader/efi_hii.c +++ b/lib/efi_loader/efi_hii.c @@ -6,7 +6,6 @@ * Copyright (c) 2018 AKASHI Takahiro, Linaro Limited */
-#include <common.h> #include <efi_loader.h> #include <malloc.h> #include <asm/unaligned.h> diff --git a/lib/efi_loader/efi_hii_config.c b/lib/efi_loader/efi_hii_config.c index 31b0c97eb286..ae0f3ecd3b18 100644 --- a/lib/efi_loader/efi_hii_config.c +++ b/lib/efi_loader/efi_hii_config.c @@ -10,7 +10,6 @@ * the Makefile. */
-#include <common.h> #include <efi_loader.h>
const efi_guid_t efi_guid_hii_config_routing_protocol diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 97547571ce33..604243603289 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -9,7 +9,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <cpu_func.h> #include <efi_loader.h> #include <log.h> diff --git a/lib/efi_loader/efi_load_initrd.c b/lib/efi_loader/efi_load_initrd.c index 193433782c24..2b467b554810 100644 --- a/lib/efi_loader/efi_load_initrd.c +++ b/lib/efi_loader/efi_load_initrd.c @@ -4,7 +4,6 @@ */
#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_load_initrd.h> #include <efi_variable.h> diff --git a/lib/efi_loader/efi_load_options.c b/lib/efi_loader/efi_load_options.c index 5f62184da1cd..01984235e248 100644 --- a/lib/efi_loader/efi_load_options.c +++ b/lib/efi_loader/efi_load_options.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <charset.h> #include <log.h> #include <malloc.h> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index f752703b438e..edfad2d95a1d 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <efi_loader.h> #include <init.h> #include <log.h> diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 96a5bcca2758..7cd536705f43 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -15,7 +15,6 @@ * Reset(): EfiSimpleNetworkInitialized -> EfiSimpleNetworkInitialized */
-#include <common.h> #include <efi_loader.h> #include <malloc.h> #include <net.h> diff --git a/lib/efi_loader/efi_riscv.c b/lib/efi_loader/efi_riscv.c index 064172755b95..4d398c5be348 100644 --- a/lib/efi_loader/efi_riscv.c +++ b/lib/efi_loader/efi_riscv.c @@ -7,7 +7,6 @@ */
#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <log.h> diff --git a/lib/efi_loader/efi_rng.c b/lib/efi_loader/efi_rng.c index bb11d8d0e0cb..9bad7ed69317 100644 --- a/lib/efi_loader/efi_rng.c +++ b/lib/efi_loader/efi_rng.c @@ -5,7 +5,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <dm.h> #include <efi_loader.h> #include <efi_rng.h> diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c index 108c14b95bd6..4d7fb74b5d6f 100644 --- a/lib/efi_loader/efi_root_node.c +++ b/lib/efi_loader/efi_root_node.c @@ -5,7 +5,6 @@ * Copyright (c) 2018 Heinrich Schuchardt */
-#include <common.h> #include <malloc.h> #include <efi_dt_fixup.h> #include <efi_loader.h> diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index bf54d6ad871d..18da6892e796 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -5,7 +5,6 @@ * Copyright (c) 2016 Alexander Graf */
-#include <common.h> #include <command.h> #include <cpu_func.h> #include <dm.h> diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 37359a77bbce..a610e032d2fa 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <log.h> diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c index 742d8919402c..f338e7327599 100644 --- a/lib/efi_loader/efi_signature.c +++ b/lib/efi_loader/efi_signature.c @@ -4,7 +4,6 @@ * Copyright (c) 2019 Linaro Limited, Author: AKASHI Takahiro */
-#include <common.h> #include <charset.h> #include <efi_loader.h> #include <efi_variable.h> diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c index 0fbf51b98d0d..bbb8421ce149 100644 --- a/lib/efi_loader/efi_smbios.c +++ b/lib/efi_loader/efi_smbios.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <efi_loader.h> #include <log.h> #include <malloc.h> diff --git a/lib/efi_loader/efi_string.c b/lib/efi_loader/efi_string.c index e21e09c94617..413e329b600c 100644 --- a/lib/efi_loader/efi_string.c +++ b/lib/efi_loader/efi_string.c @@ -5,7 +5,6 @@ * Copyright (c) 2020 AKASHI Takahiro, Linaro Limited */
-#include <common.h> #include <charset.h> #include <efi_loader.h> #include <malloc.h> diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 463ea4c15416..8db35d0b3c85 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -8,7 +8,6 @@ */
#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <efi_variable.h> diff --git a/lib/efi_loader/efi_unicode_collation.c b/lib/efi_loader/efi_unicode_collation.c index c4c75720634a..2b6912c50921 100644 --- a/lib/efi_loader/efi_unicode_collation.c +++ b/lib/efi_loader/efi_unicode_collation.c @@ -5,7 +5,6 @@ * Copyright (c) 2018 Heinrich Schuchardt xypron.glpk@gmx.de */
-#include <common.h> #include <charset.h> #include <cp1250.h> #include <cp437.h> diff --git a/lib/efi_loader/efi_var_common.c b/lib/efi_loader/efi_var_common.c index ad50bffd2b26..d528747f3fb4 100644 --- a/lib/efi_loader/efi_var_common.c +++ b/lib/efi_loader/efi_var_common.c @@ -6,7 +6,6 @@ * Copyright (c) 2020 Linaro Limited, Author: AKASHI Takahiro */
-#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <stdlib.h> diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c index d7dba050710a..532b6b40eefe 100644 --- a/lib/efi_loader/efi_var_file.c +++ b/lib/efi_loader/efi_var_file.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <charset.h> #include <fs.h> #include <log.h> diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index 5fa7dcb8d3ed..6c21cec5d457 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -5,7 +5,6 @@ * Copyright (c) 2020, Heinrich Schuchardt */
-#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <u-boot/crc.h> diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index be95ed44e6ef..40f7a0fb10d5 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -7,7 +7,6 @@
#define LOG_CATEGORY LOGC_EFI
-#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <env.h> diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c index 09d03c0eee78..dde135fd9f81 100644 --- a/lib/efi_loader/efi_variable_tee.c +++ b/lib/efi_loader/efi_variable_tee.c @@ -10,7 +10,6 @@ * Abdellatif El Khlifi abdellatif.elkhlifi@arm.com */
-#include <common.h> #if CONFIG_IS_ENABLED(ARM_FFA_TRANSPORT) #include <arm_ffa.h> #endif diff --git a/lib/efi_loader/efi_watchdog.c b/lib/efi_loader/efi_watchdog.c index d741076dcdd9..f5fb9117717c 100644 --- a/lib/efi_loader/efi_watchdog.c +++ b/lib/efi_loader/efi_watchdog.c @@ -5,7 +5,6 @@ * Copyright (c) 2017 Heinrich Schuchardt */
-#include <common.h> #include <efi_loader.h>
/* Conversion factor from seconds to multiples of 100ns */ diff --git a/lib/efi_loader/initrddump.c b/lib/efi_loader/initrddump.c index 5b470f481946..0004b6b042b4 100644 --- a/lib/efi_loader/initrddump.c +++ b/lib/efi_loader/initrddump.c @@ -9,7 +9,6 @@ * clearing of the screen. */
-#include <common.h> #include <efi_api.h> #include <efi_load_initrd.h>

On Thu, 14 Dec 2023 at 11:19, Tom Rini trini@konsulko.com wrote:
We largely do not need <common.h> in these files, so drop it. The only exception here is that efi_freestanding.c needs <linux/types.h> and had been getting that via <common.h>.
Signed-off-by: Tom Rini trini@konsulko.com
lib/efi_loader/dtbdump.c | 1 - lib/efi_loader/efi_acpi.c | 1 - lib/efi_loader/efi_bootmgr.c | 1 - lib/efi_loader/efi_boottime.c | 1 - lib/efi_loader/efi_capsule.c | 1 - lib/efi_loader/efi_conformance.c | 1 - lib/efi_loader/efi_console.c | 1 - lib/efi_loader/efi_device_path.c | 1 - lib/efi_loader/efi_device_path_to_text.c | 1 - lib/efi_loader/efi_device_path_utilities.c | 1 - lib/efi_loader/efi_disk.c | 1 - lib/efi_loader/efi_dt_fixup.c | 1 - lib/efi_loader/efi_esrt.c | 1 - lib/efi_loader/efi_file.c | 1 - lib/efi_loader/efi_firmware.c | 1 - lib/efi_loader/efi_freestanding.c | 2 +- lib/efi_loader/efi_gop.c | 1 - lib/efi_loader/efi_helper.c | 1 - lib/efi_loader/efi_hii.c | 1 - lib/efi_loader/efi_hii_config.c | 1 - lib/efi_loader/efi_image_loader.c | 1 - lib/efi_loader/efi_load_initrd.c | 1 - lib/efi_loader/efi_load_options.c | 1 - lib/efi_loader/efi_memory.c | 1 - lib/efi_loader/efi_net.c | 1 - lib/efi_loader/efi_riscv.c | 1 - lib/efi_loader/efi_rng.c | 1 - lib/efi_loader/efi_root_node.c | 1 - lib/efi_loader/efi_runtime.c | 1 - lib/efi_loader/efi_setup.c | 1 - lib/efi_loader/efi_signature.c | 1 - lib/efi_loader/efi_smbios.c | 1 - lib/efi_loader/efi_string.c | 1 - lib/efi_loader/efi_tcg2.c | 1 - lib/efi_loader/efi_unicode_collation.c | 1 - lib/efi_loader/efi_var_common.c | 1 - lib/efi_loader/efi_var_file.c | 1 - lib/efi_loader/efi_var_mem.c | 1 - lib/efi_loader/efi_variable.c | 1 - lib/efi_loader/efi_variable_tee.c | 1 - lib/efi_loader/efi_watchdog.c | 1 - lib/efi_loader/initrddump.c | 1 - 42 files changed, 1 insertion(+), 42 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

In include/display_options.h we cannot include ourself, but do need <linux/types.h> directly. Then in lib/display_options.c we further clean the list to remove common.h.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- lib/display_options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/display_options.c b/lib/display_options.c index 80def5201f96..d6b93553dcb5 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -4,14 +4,15 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */
-#include <common.h> #include <compiler.h> #include <console.h> #include <display_options.h> #include <div64.h> #include <version_string.h> #include <linux/ctype.h> +#include <linux/kernel.h> #include <asm/io.h> +#include <vsprintf.h>
char *display_options_get_banner_priv(bool newlines, const char *build_tag, char *buf, int size)

Add some missing headers such as <linux/errno.h> or <linux/types.h> or <linux/kernel.h> to header files that make direct usage of things provided by these headers.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- include/atmel_lcd.h | 2 ++ include/getopt.h | 2 ++ include/mapmem.h | 2 ++ include/memalign.h | 1 + include/net6.h | 1 + include/rtc.h | 1 + 6 files changed, 9 insertions(+)
diff --git a/include/atmel_lcd.h b/include/atmel_lcd.h index 66436b9b2772..a115d6c17014 100644 --- a/include/atmel_lcd.h +++ b/include/atmel_lcd.h @@ -9,6 +9,8 @@ #ifndef _ATMEL_LCD_H_ #define _ATMEL_LCD_H_
+#include <linux/types.h> + /** * struct atmel_lcd_plat - platform data for Atmel LCDs with driver model * diff --git a/include/getopt.h b/include/getopt.h index 6f5811e64be9..8645082da2a7 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -9,6 +9,8 @@ #ifndef __GETOPT_H #define __GETOPT_H
+#include <stdbool.h> + /** * struct getopt_state - Saved state across getopt() calls */ diff --git a/include/mapmem.h b/include/mapmem.h index 2134c8004d94..bb68b4c11afd 100644 --- a/include/mapmem.h +++ b/include/mapmem.h @@ -13,6 +13,8 @@ # ifdef CONFIG_ARCH_MAP_SYSMEM #include <asm/io.h> # else +#include <linux/types.h> + static inline void *map_sysmem(phys_addr_t paddr, unsigned long len) { return (void *)(uintptr_t)paddr; diff --git a/include/memalign.h b/include/memalign.h index f67f0a74f2e8..eaa9f6b5cbd6 100644 --- a/include/memalign.h +++ b/include/memalign.h @@ -11,6 +11,7 @@ * is used to align DMA buffers. */ #ifndef __ASSEMBLY__ +#include <linux/kernel.h> #include <asm/cache.h> #include <malloc.h>
diff --git a/include/net6.h b/include/net6.h index 1e766aa72092..1ed989e584ae 100644 --- a/include/net6.h +++ b/include/net6.h @@ -12,6 +12,7 @@
#include <net.h> #include <linux/ctype.h> +#include <linux/errno.h>
/* struct in6_addr - 128 bits long IPv6 address */ struct in6_addr { diff --git a/include/rtc.h b/include/rtc.h index b6fdbb60dc2b..22f6d3705917 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -16,6 +16,7 @@ #include <bcd.h> #include <rtc_def.h> #include <linux/errno.h> +#include <linux/types.h>
typedef int64_t time64_t; struct udevice;

After some header file cleanups to add missing include files, remove common.h from all files in the lib directory. This primarily means just dropping the line but in a few cases we need to add in other header files now.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org --- lib/abuf.c | 1 - lib/acpi/acpi.c | 1 - lib/acpi/acpi_device.c | 1 - lib/acpi/acpi_dp.c | 1 - lib/acpi/acpi_table.c | 1 - lib/acpi/acpi_writer.c | 2 +- lib/acpi/acpigen.c | 1 - lib/acpi/base.c | 3 ++- lib/acpi/csrt.c | 2 +- lib/acpi/dsdt.c | 2 +- lib/acpi/facs.c | 2 +- lib/acpi/mcfg.c | 4 +++- lib/acpi/ssdt.c | 3 ++- lib/addr_map.c | 1 - lib/aes.c | 2 +- lib/aes/aes-decrypt.c | 1 - lib/asm-offsets.c | 2 +- lib/at91/at91.c | 1 - lib/bch.c | 1 - lib/binman.c | 1 - lib/bzip2/bzlib.c | 3 +-- lib/bzip2/bzlib_decompress.c | 1 - lib/charset.c | 1 - lib/circbuf.c | 1 - lib/crc16-ccitt.c | 2 -- lib/crc32.c | 1 - lib/crc32c.c | 1 - lib/crc8.c | 2 -- lib/crypt/crypt-port.h | 3 +++ lib/crypt/crypt.c | 1 - lib/crypto/x509_public_key.c | 1 - lib/date.c | 1 - lib/dhry/cmd_dhry.c | 3 ++- lib/dhry/dhry_1.c | 2 +- lib/dhry/dhry_2.c | 2 +- lib/efi/efi.c | 1 - lib/efi/efi_app.c | 1 - lib/efi/efi_info.c | 1 - lib/efi/efi_stub.c | 1 - lib/efi_driver/efi_block_device.c | 1 - lib/efi_driver/efi_uclass.c | 1 - lib/efi_selftest/efi_selftest_esrt.c | 1 - lib/efi_selftest/efi_selftest_miniapp_exception.c | 1 - lib/efi_selftest/efi_selftest_miniapp_exit.c | 1 - lib/efi_selftest/efi_selftest_miniapp_return.c | 1 - lib/elf.c | 1 - lib/errno_str.c | 2 +- lib/fdtdec.c | 1 - lib/fdtdec_common.c | 1 - lib/fdtdec_test.c | 1 - lib/getopt.c | 2 +- lib/gunzip.c | 1 - lib/gzip.c | 1 - lib/hang.c | 2 +- lib/hash-checksum.c | 1 - lib/hashtable.c | 1 - lib/hexdump.c | 2 +- lib/image-sparse.c | 1 - lib/initcall.c | 1 - lib/linux_compat.c | 1 - lib/list_sort.c | 1 - lib/lmb.c | 1 - lib/lz4.c | 1 - lib/lz4_wrapper.c | 1 - lib/lzma/LzmaDec.c | 1 - lib/lzma/LzmaTools.c | 1 - lib/lzo/lzo1x_decompress.c | 3 ++- lib/md5.c | 1 - lib/membuff.c | 1 - lib/net_utils.c | 2 +- lib/of_live.c | 1 - lib/optee/optee.c | 1 - lib/panic.c | 1 - lib/physmem.c | 2 +- lib/qsort.c | 1 - lib/rand.c | 1 - lib/rc4.c | 3 --- lib/rsa/rsa-keyprop.c | 1 - lib/rsa/rsa-mod-exp.c | 1 - lib/rsa/rsa-verify.c | 1 - lib/rtc-lib.c | 1 - lib/semihosting.c | 3 ++- lib/slre.c | 2 +- lib/smbios-parser.c | 1 - lib/smbios.c | 1 - lib/strto.c | 2 +- lib/tables_csum.c | 3 +-- lib/time.c | 1 - lib/tiny-printf.c | 1 - lib/tpm-common.c | 1 - lib/tpm-v1.c | 1 - lib/tpm-v2.c | 1 - lib/tpm_api.c | 1 - lib/trace.c | 2 +- lib/uuid.c | 2 -- lib/vsprintf.c | 1 - lib/zstd/zstd.c | 2 +- 97 files changed, 36 insertions(+), 103 deletions(-)
diff --git a/lib/abuf.c b/lib/abuf.c index ce2cff53dc93..937c3df351e9 100644 --- a/lib/abuf.c +++ b/lib/abuf.c @@ -7,7 +7,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <malloc.h> #include <mapmem.h> #include <string.h> diff --git a/lib/acpi/acpi.c b/lib/acpi/acpi.c index f21e5094615c..939a638bb5b5 100644 --- a/lib/acpi/acpi.c +++ b/lib/acpi/acpi.c @@ -5,7 +5,6 @@ * Copyright 2023 Google LLC */
-#include <common.h> #include <mapmem.h> #include <acpi/acpi_table.h> #include <asm/global_data.h> diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c index 1b838fdbd6f0..ed94194346d5 100644 --- a/lib/acpi/acpi_device.c +++ b/lib/acpi/acpi_device.c @@ -6,7 +6,6 @@ * Mostly taken from coreboot file of the same name */
-#include <common.h> #include <dm.h> #include <irq.h> #include <log.h> diff --git a/lib/acpi/acpi_dp.c b/lib/acpi/acpi_dp.c index 7e3e3259d8d4..6733809986ae 100644 --- a/lib/acpi/acpi_dp.c +++ b/lib/acpi/acpi_dp.c @@ -6,7 +6,6 @@ * Mostly taken from coreboot file acpi_device.c */
-#include <common.h> #include <dm.h> #include <log.h> #include <malloc.h> diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c index a8d4b470001d..e74522e9972e 100644 --- a/lib/acpi/acpi_table.c +++ b/lib/acpi/acpi_table.c @@ -5,7 +5,6 @@ * Copyright 2019 Google LLC */
-#include <common.h> #include <dm.h> #include <cpu.h> #include <log.h> diff --git a/lib/acpi/acpi_writer.c b/lib/acpi/acpi_writer.c index 946f90e8e7b1..a8dc207557b4 100644 --- a/lib/acpi/acpi_writer.c +++ b/lib/acpi/acpi_writer.c @@ -7,13 +7,13 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <log.h> #include <malloc.h> #include <mapmem.h> #include <acpi/acpi_table.h> #include <asm/global_data.h> #include <dm/acpi.h> +#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/acpi/acpigen.c b/lib/acpi/acpigen.c index e395226e3de3..b95cabb91493 100644 --- a/lib/acpi/acpigen.c +++ b/lib/acpi/acpigen.c @@ -8,7 +8,6 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <dm.h> #include <log.h> #include <uuid.h> diff --git a/lib/acpi/base.c b/lib/acpi/base.c index 26bf0cb8d30d..07b53e0c5614 100644 --- a/lib/acpi/base.c +++ b/lib/acpi/base.c @@ -7,12 +7,13 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> #include <mapmem.h> #include <tables_csum.h> #include <linux/sizes.h> +#include <linux/errno.h> +#include <linux/string.h>
void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt, struct acpi_xsdt *xsdt) diff --git a/lib/acpi/csrt.c b/lib/acpi/csrt.c index 2ba86f229529..00927e534063 100644 --- a/lib/acpi/csrt.c +++ b/lib/acpi/csrt.c @@ -7,11 +7,11 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <mapmem.h> #include <tables_csum.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> +#include <linux/string.h>
__weak int acpi_fill_csrt(struct acpi_ctx *ctx) { diff --git a/lib/acpi/dsdt.c b/lib/acpi/dsdt.c index db98cc20e1d0..206e1e2678ff 100644 --- a/lib/acpi/dsdt.c +++ b/lib/acpi/dsdt.c @@ -7,10 +7,10 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> #include <tables_csum.h> +#include <linux/string.h>
/* * IASL compiles the dsdt entries and writes the hex values diff --git a/lib/acpi/facs.c b/lib/acpi/facs.c index e89f43ca5c91..86c28120c7e3 100644 --- a/lib/acpi/facs.c +++ b/lib/acpi/facs.c @@ -7,9 +7,9 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> +#include <linux/string.h>
int acpi_write_facs(struct acpi_ctx *ctx, const struct acpi_writer *entry) { diff --git a/lib/acpi/mcfg.c b/lib/acpi/mcfg.c index 7404ae586ab7..8b8a5bfafae2 100644 --- a/lib/acpi/mcfg.c +++ b/lib/acpi/mcfg.c @@ -7,11 +7,13 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <mapmem.h> #include <tables_csum.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> +#include <linux/errno.h> +#include <linux/string.h> +#include <linux/types.h>
int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base, u16 seg_nr, u8 start, u8 end) diff --git a/lib/acpi/ssdt.c b/lib/acpi/ssdt.c index b140b4b2ff65..b0a96f846e39 100644 --- a/lib/acpi/ssdt.c +++ b/lib/acpi/ssdt.c @@ -7,10 +7,11 @@
#define LOG_CATEGORY LOGC_ACPI
-#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> #include <tables_csum.h> +#include <linux/errno.h> +#include <linux/string.h>
int acpi_write_ssdt(struct acpi_ctx *ctx, const struct acpi_writer *entry) { diff --git a/lib/addr_map.c b/lib/addr_map.c index 86e932e4b561..f85fb0c7fb1b 100644 --- a/lib/addr_map.c +++ b/lib/addr_map.c @@ -3,7 +3,6 @@ * Copyright 2008 Freescale Semiconductor, Inc. */
-#include <common.h> #include <addr_map.h> #include <mapmem.h>
diff --git a/lib/aes.c b/lib/aes.c index 4fca85ebee26..39ad4a990f07 100644 --- a/lib/aes.c +++ b/lib/aes.c @@ -22,9 +22,9 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <display_options.h> #include <log.h> +#include <linux/string.h> #else #include <string.h> #endif diff --git a/lib/aes/aes-decrypt.c b/lib/aes/aes-decrypt.c index 345029fa7847..741102a4723b 100644 --- a/lib/aes/aes-decrypt.c +++ b/lib/aes/aes-decrypt.c @@ -4,7 +4,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <malloc.h> #endif #include <image.h> diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c index 216d9716d0d6..4e2dbda9a710 100644 --- a/lib/asm-offsets.c +++ b/lib/asm-offsets.c @@ -11,9 +11,9 @@ * #defines from the assembly-language output. */
-#include <common.h> #include <asm-offsets.h> #include <asm/global_data.h> +#include <asm/u-boot.h>
#include <linux/kbuild.h>
diff --git a/lib/at91/at91.c b/lib/at91/at91.c index 048597690b1d..bd31e9e41dc1 100644 --- a/lib/at91/at91.c +++ b/lib/at91/at91.c @@ -4,7 +4,6 @@ * Wenyou.Yang wenyou.yang@microchip.com */
-#include <common.h> #include <atmel_lcd.h>
#include "atmel_logo_8bpp.h" diff --git a/lib/bch.c b/lib/bch.c index 72b4fdcc9c44..a309a8dfcba4 100644 --- a/lib/bch.c +++ b/lib/bch.c @@ -54,7 +54,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <log.h> #include <malloc.h> #include <ubi_uboot.h> diff --git a/lib/binman.c b/lib/binman.c index cfe1e5f80710..9047f5275f32 100644 --- a/lib/binman.c +++ b/lib/binman.c @@ -6,7 +6,6 @@ * Written by Simon Glass sjg@chromium.org */
-#include <common.h> #include <binman.h> #include <dm.h> #include <log.h> diff --git a/lib/bzip2/bzlib.c b/lib/bzip2/bzlib.c index bd589aa810c1..f7318b7886e0 100644 --- a/lib/bzip2/bzlib.c +++ b/lib/bzip2/bzlib.c @@ -1,7 +1,6 @@ -#include <config.h> -#include <common.h> #include <malloc.h> #include <watchdog.h> +#include <stdio.h>
/* * This file is a modified version of bzlib.c from the bzip2-1.0.2 diff --git a/lib/bzip2/bzlib_decompress.c b/lib/bzip2/bzlib_decompress.c index 3b417d57b276..e56ab6674b05 100644 --- a/lib/bzip2/bzlib_decompress.c +++ b/lib/bzip2/bzlib_decompress.c @@ -1,5 +1,4 @@ #include <config.h> -#include <common.h> #include <watchdog.h>
/*-------------------------------------------------------------*/ diff --git a/lib/charset.c b/lib/charset.c index 5e4c4f948a4a..89057ef7ce22 100644 --- a/lib/charset.c +++ b/lib/charset.c @@ -5,7 +5,6 @@ * Copyright (c) 2017 Rob Clark */
-#include <common.h> #include <charset.h> #include <capitalization.h> #include <cp437.h> diff --git a/lib/circbuf.c b/lib/circbuf.c index fa79c148dae4..2e161ae8d8ba 100644 --- a/lib/circbuf.c +++ b/lib/circbuf.c @@ -4,7 +4,6 @@ * Gerry Hamel, geh@ti.com, Texas Instruments */
-#include <common.h> #include <log.h> #include <malloc.h>
diff --git a/lib/crc16-ccitt.c b/lib/crc16-ccitt.c index 6cadbc103d3e..6fa4e93ed17c 100644 --- a/lib/crc16-ccitt.c +++ b/lib/crc16-ccitt.c @@ -24,8 +24,6 @@
#ifdef USE_HOSTCC #include <arpa/inet.h> -#else -#include <common.h> #endif #include <u-boot/crc.h>
diff --git a/lib/crc32.c b/lib/crc32.c index f6fad8c15dfc..f36f1763064f 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -11,7 +11,6 @@ #ifdef USE_HOSTCC #include <arpa/inet.h> #else -#include <common.h> #include <efi_loader.h> #endif #include <compiler.h> diff --git a/lib/crc32c.c b/lib/crc32c.c index 016b34a523b8..7026ac4c330e 100644 --- a/lib/crc32c.c +++ b/lib/crc32c.c @@ -10,7 +10,6 @@ * any later version. */
-#include <common.h> #include <compiler.h>
uint32_t crc32c_cal(uint32_t crc, const char *data, int length, diff --git a/lib/crc8.c b/lib/crc8.c index 87b87b675b27..20d46d161472 100644 --- a/lib/crc8.c +++ b/lib/crc8.c @@ -5,8 +5,6 @@
#ifdef USE_HOSTCC #include <arpa/inet.h> -#else -#include <common.h> #endif #include <u-boot/crc.h>
diff --git a/lib/crypt/crypt-port.h b/lib/crypt/crypt-port.h index 6b9542d75bc2..50dde68b5cde 100644 --- a/lib/crypt/crypt-port.h +++ b/lib/crypt/crypt-port.h @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* Copyright (C) 2020 Steffen Jaeckel jaeckel-floss@eyet-services.de */
+#include <linux/errno.h> +#include <linux/kernel.h> +#include <linux/string.h> #include <linux/types.h> #include <vsprintf.h>
diff --git a/lib/crypt/crypt.c b/lib/crypt/crypt.c index 247c34b2a9c3..8f5fadb582ed 100644 --- a/lib/crypt/crypt.c +++ b/lib/crypt/crypt.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* Copyright (C) 2020 Steffen Jaeckel jaeckel-floss@eyet-services.de */
-#include <common.h> #include <crypt.h> #include "crypt-port.h"
diff --git a/lib/crypto/x509_public_key.c b/lib/crypto/x509_public_key.c index 30071233ee79..a10145a7cdcf 100644 --- a/lib/crypto/x509_public_key.c +++ b/lib/crypto/x509_public_key.c @@ -7,7 +7,6 @@
#define pr_fmt(fmt) "X.509: "fmt #ifdef __UBOOT__ -#include <common.h> #include <image.h> #include <dm/devres.h> #include <linux/compat.h> diff --git a/lib/date.c b/lib/date.c index e3d22459cd05..0deac8a1bee1 100644 --- a/lib/date.c +++ b/lib/date.c @@ -4,7 +4,6 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */
-#include <common.h> #include <command.h> #include <errno.h> #include <rtc.h> diff --git a/lib/dhry/cmd_dhry.c b/lib/dhry/cmd_dhry.c index 77b52a23003c..e52beaeaadc7 100644 --- a/lib/dhry/cmd_dhry.c +++ b/lib/dhry/cmd_dhry.c @@ -3,9 +3,10 @@ * (C) Copyright 2015 Google, Inc */
-#include <common.h> #include <command.h> #include <div64.h> +#include <time.h> +#include <vsprintf.h> #include "dhry.h"
static int do_dhry(struct cmd_tbl *cmdtp, int flag, int argc, diff --git a/lib/dhry/dhry_1.c b/lib/dhry/dhry_1.c index dcc224fb387d..252cd14a656e 100644 --- a/lib/dhry/dhry_1.c +++ b/lib/dhry/dhry_1.c @@ -42,8 +42,8 @@ ***************************************************************************/ char SCCSid[] = "@(#) @(#)dhry_1.c:3.4 -- 5/15/91 19:30:21";
-#include <common.h> #include <malloc.h> +#include <stdio.h>
#include "dhry.h"
diff --git a/lib/dhry/dhry_2.c b/lib/dhry/dhry_2.c index 1ba879673e30..a74197d884de 100644 --- a/lib/dhry/dhry_2.c +++ b/lib/dhry/dhry_2.c @@ -39,7 +39,7 @@ ****************************************************************************/ /* SCCSid is defined in dhry_1.c */
-#include <common.h> +#include <linux/string.h> #include "dhry.h"
#ifndef REG diff --git a/lib/efi/efi.c b/lib/efi/efi.c index aa42f1842f33..bcb34d67465d 100644 --- a/lib/efi/efi.c +++ b/lib/efi/efi.c @@ -10,7 +10,6 @@ * Common EFI functions */
-#include <common.h> #include <debug_uart.h> #include <errno.h> #include <malloc.h> diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 2209410f35b5..a5ffa53b5a4e 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -8,7 +8,6 @@ * This file implements U-Boot running as an EFI application. */
-#include <common.h> #include <cpu_func.h> #include <debug_uart.h> #include <dm.h> diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c index 4d78923c4d40..5b564c5651d5 100644 --- a/lib/efi/efi_info.c +++ b/lib/efi/efi_info.c @@ -5,7 +5,6 @@ * Access to the EFI information table */
-#include <common.h> #include <efi.h> #include <errno.h> #include <mapmem.h> diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index c9eb32ec1046..40fc29d9adf7 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -9,7 +9,6 @@ * EFI application. It can be built either in 32-bit or 64-bit mode. */
-#include <common.h> #include <debug_uart.h> #include <efi.h> #include <efi_api.h> diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index e3abd90275c8..34a0365739d7 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/lib/efi_driver/efi_block_device.c @@ -28,7 +28,6 @@ * iPXE uses the simple file protocol to load Grub or the Linux Kernel. */
-#include <common.h> #include <blk.h> #include <dm.h> #include <efi_driver.h> diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index 66a45e156d60..e1e28df20b2c 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/lib/efi_driver/efi_uclass.c @@ -17,7 +17,6 @@ * controllers. */
-#include <common.h> #include <dm.h> #include <efi_driver.h> #include <log.h> diff --git a/lib/efi_selftest/efi_selftest_esrt.c b/lib/efi_selftest/efi_selftest_esrt.c index 922ff253c72c..b7688deb4964 100644 --- a/lib/efi_selftest/efi_selftest_esrt.c +++ b/lib/efi_selftest/efi_selftest_esrt.c @@ -4,7 +4,6 @@ * * Copyright (C) 2021 Arm Ltd. */ -#include <common.h> #include <efi_loader.h> #include <efi_selftest.h>
diff --git a/lib/efi_selftest/efi_selftest_miniapp_exception.c b/lib/efi_selftest/efi_selftest_miniapp_exception.c index a9ad381001f9..f668cdac4ab2 100644 --- a/lib/efi_selftest/efi_selftest_miniapp_exception.c +++ b/lib/efi_selftest/efi_selftest_miniapp_exception.c @@ -7,7 +7,6 @@ * This EFI application triggers an exception. */
-#include <common.h> #include <efi_api.h> #include <host_arch.h>
diff --git a/lib/efi_selftest/efi_selftest_miniapp_exit.c b/lib/efi_selftest/efi_selftest_miniapp_exit.c index 1c42d6dd400f..8b2e60cc7114 100644 --- a/lib/efi_selftest/efi_selftest_miniapp_exit.c +++ b/lib/efi_selftest/efi_selftest_miniapp_exit.c @@ -8,7 +8,6 @@ * It uses the Exit boot service to return. */
-#include <common.h> #include <efi_selftest.h>
static efi_guid_t loaded_image_protocol_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID; diff --git a/lib/efi_selftest/efi_selftest_miniapp_return.c b/lib/efi_selftest/efi_selftest_miniapp_return.c index 45366aa9c638..8792d78ab30f 100644 --- a/lib/efi_selftest/efi_selftest_miniapp_return.c +++ b/lib/efi_selftest/efi_selftest_miniapp_return.c @@ -8,7 +8,6 @@ * It returns directly without calling the Exit boot service. */
-#include <common.h> #include <efi_api.h>
/* diff --git a/lib/elf.c b/lib/elf.c index 0476b2614c33..9a794f9cba89 100644 --- a/lib/elf.c +++ b/lib/elf.c @@ -3,7 +3,6 @@ Copyright (c) 2001 William L. Pitts */
-#include <common.h> #include <command.h> #include <cpu_func.h> #include <elf.h> diff --git a/lib/errno_str.c b/lib/errno_str.c index 2e5f4a887d5b..752d4eb47aa6 100644 --- a/lib/errno_str.c +++ b/lib/errno_str.c @@ -4,8 +4,8 @@ * * SDPX-License-Identifier: GPL-2.0+ */ -#include <common.h> #include <errno.h> +#include <linux/kernel.h>
#define ERRNO_MSG(errno, msg) msg #define SAME_AS(x) (const char *)&errno_message[x] diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 7a6916764835..4016bf3c1130 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -7,7 +7,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <boot_fit.h> #include <display_options.h> #include <dm.h> diff --git a/lib/fdtdec_common.c b/lib/fdtdec_common.c index ddaca0087e19..ca36ff15952b 100644 --- a/lib/fdtdec_common.c +++ b/lib/fdtdec_common.c @@ -8,7 +8,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <log.h> #include <linux/libfdt.h> #include <fdtdec.h> diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c index 85351c75ca29..1e4d5fc83264 100644 --- a/lib/fdtdec_test.c +++ b/lib/fdtdec_test.c @@ -6,7 +6,6 @@ * Copyright (c) 2011 The Chromium OS Authors. */
-#include <common.h> #include <command.h> #include <fdtdec.h> #include <linux/libfdt.h> diff --git a/lib/getopt.c b/lib/getopt.c index 8b4515dc1967..e9175e2fff49 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -8,9 +8,9 @@
#define LOG_CATEGORY LOGC_CORE
-#include <common.h> #include <getopt.h> #include <log.h> +#include <linux/string.h>
void getopt_init_state(struct getopt_state *gs) { diff --git a/lib/gunzip.c b/lib/gunzip.c index 932e3e8036d1..e71d8d00ccb5 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -4,7 +4,6 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */
-#include <common.h> #include <blk.h> #include <command.h> #include <console.h> diff --git a/lib/gzip.c b/lib/gzip.c index 2595b2d04b42..5d9c19598d5e 100644 --- a/lib/gzip.c +++ b/lib/gzip.c @@ -4,7 +4,6 @@ * Lei Wen leiwen@marvell.com, Marvell Inc. */
-#include <common.h> #include <watchdog.h> #include <command.h> #include <gzip.h> diff --git a/lib/hang.c b/lib/hang.c index 2735774f9a40..3cfb06e9ca8d 100644 --- a/lib/hang.c +++ b/lib/hang.c @@ -7,9 +7,9 @@ * u-boot. */
-#include <common.h> #include <bootstage.h> #include <hang.h> +#include <stdio.h> #include <os.h>
/** diff --git a/lib/hash-checksum.c b/lib/hash-checksum.c index 68c290d64d86..1970a741294d 100644 --- a/lib/hash-checksum.c +++ b/lib/hash-checksum.c @@ -4,7 +4,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <fdtdec.h> #include <asm/byteorder.h> #include <linux/errno.h> diff --git a/lib/hashtable.c b/lib/hashtable.c index f2d36bd34b4c..a0060f6a0d63 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -30,7 +30,6 @@ # endif # endif #else /* U-Boot build */ -# include <common.h> # include <linux/string.h> # include <linux/ctype.h> #endif diff --git a/lib/hexdump.c b/lib/hexdump.c index 149c93ead8b8..33e3e6e51824 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c @@ -8,9 +8,9 @@ * more details. */
-#include <common.h> #include <hexdump.h> #include <mapmem.h> +#include <vsprintf.h> #include <linux/ctype.h> #include <linux/compat.h> #include <linux/log2.h> diff --git a/lib/image-sparse.c b/lib/image-sparse.c index 323aad981c64..f82890646920 100644 --- a/lib/image-sparse.c +++ b/lib/image-sparse.c @@ -35,7 +35,6 @@ */
#include <config.h> -#include <common.h> #include <blk.h> #include <image-sparse.h> #include <div64.h> diff --git a/lib/initcall.c b/lib/initcall.c index 33b7d761dc7e..ce317af213ab 100644 --- a/lib/initcall.c +++ b/lib/initcall.c @@ -3,7 +3,6 @@ * Copyright (c) 2013 The Chromium OS Authors. */
-#include <common.h> #include <efi.h> #include <initcall.h> #include <log.h> diff --git a/lib/linux_compat.c b/lib/linux_compat.c index c83426f59dc2..985e88eb3976 100644 --- a/lib/linux_compat.c +++ b/lib/linux_compat.c @@ -1,5 +1,4 @@
-#include <common.h> #include <malloc.h> #include <memalign.h> #include <asm/cache.h> diff --git a/lib/list_sort.c b/lib/list_sort.c index 1c9e06173270..a6e54d5bc46e 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -6,7 +6,6 @@ #include <linux/slab.h> #else #include <linux/compat.h> -#include <common.h> #include <malloc.h> #include <linux/printk.h> #endif diff --git a/lib/lmb.c b/lib/lmb.c index da924c6789ac..44f982053101 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -6,7 +6,6 @@ * Copyright (C) 2001 Peter Bergner. */
-#include <common.h> #include <efi_loader.h> #include <image.h> #include <mapmem.h> diff --git a/lib/lz4.c b/lib/lz4.c index 5337842126c8..d365dc727cfd 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -27,7 +27,6 @@ * - LZ4 homepage : http://www.lz4.org * - LZ4 source repository : https://github.com/lz4/lz4 */ -#include <common.h> #include <compiler.h> #include <linux/kernel.h> #include <linux/types.h> diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c index 67dea2ff3904..4d48e7b0e8bf 100644 --- a/lib/lz4_wrapper.c +++ b/lib/lz4_wrapper.c @@ -3,7 +3,6 @@ * Copyright 2015 Google Inc. */
-#include <common.h> #include <compiler.h> #include <image.h> #include <linux/kernel.h> diff --git a/lib/lzma/LzmaDec.c b/lib/lzma/LzmaDec.c index a90b35c6a993..1da3f0a14a7d 100644 --- a/lib/lzma/LzmaDec.c +++ b/lib/lzma/LzmaDec.c @@ -2,7 +2,6 @@ 2009-09-20 : Igor Pavlov : Public domain */
#include <config.h> -#include <common.h> #include <watchdog.h> #include "LzmaDec.h"
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c index 55f64cd28908..400d606784ea 100644 --- a/lib/lzma/LzmaTools.c +++ b/lib/lzma/LzmaTools.c @@ -18,7 +18,6 @@ */
#include <config.h> -#include <common.h> #include <log.h> #include <watchdog.h>
diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c index 65fef0b0eb90..5d70fa413379 100644 --- a/lib/lzo/lzo1x_decompress.c +++ b/lib/lzo/lzo1x_decompress.c @@ -11,8 +11,9 @@ * Richard Purdie rpurdie@openedhand.com */
-#include <common.h> +#include <linux/kernel.h> #include <linux/lzo.h> +#include <linux/string.h> #include <asm/byteorder.h> #include <asm/unaligned.h> #include "lzodefs.h" diff --git a/lib/md5.c b/lib/md5.c index 1636ab936619..faf3f78ab1ed 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -28,7 +28,6 @@ #include "compiler.h"
#ifndef USE_HOSTCC -#include <common.h> #include <watchdog.h> #endif /* USE_HOSTCC */ #include <u-boot/md5.h> diff --git a/lib/membuff.c b/lib/membuff.c index 36dc43a523fb..3c6c0ae125c4 100644 --- a/lib/membuff.c +++ b/lib/membuff.c @@ -6,7 +6,6 @@ * Copyright (c) 1992 Simon Glass */
-#include <common.h> #include <errno.h> #include <log.h> #include <malloc.h> diff --git a/lib/net_utils.c b/lib/net_utils.c index 4283c13a31d9..c70fef0d991b 100644 --- a/lib/net_utils.c +++ b/lib/net_utils.c @@ -9,9 +9,9 @@ * Copyright 2009 Dirk Behme, dirk.behme@googlemail.com */
-#include <common.h> #include <net.h> #include <net6.h> +#include <vsprintf.h>
struct in_addr string_to_ip(const char *s) { diff --git a/lib/of_live.c b/lib/of_live.c index 812c488f6067..90b9459ede31 100644 --- a/lib/of_live.c +++ b/lib/of_live.c @@ -10,7 +10,6 @@
#define LOG_CATEGORY LOGC_DT
-#include <common.h> #include <abuf.h> #include <log.h> #include <linux/libfdt.h> diff --git a/lib/optee/optee.c b/lib/optee/optee.c index b03622404469..393f2715a9c1 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -4,7 +4,6 @@ * Bryan O'Donoghue bryan.odonoghue@linaro.org */
-#include <common.h> #include <fdtdec.h> #include <image.h> #include <log.h> diff --git a/lib/panic.c b/lib/panic.c index 66ae17f3df99..0f578b5b5131 100644 --- a/lib/panic.c +++ b/lib/panic.c @@ -9,7 +9,6 @@ * Wirzenius wrote this portably, Torvalds fucked it up :-) */
-#include <common.h> #include <hang.h> #if !defined(CONFIG_PANIC_HANG) #include <command.h> diff --git a/lib/physmem.c b/lib/physmem.c index fc90ce4d7cfd..562c74d37f31 100644 --- a/lib/physmem.c +++ b/lib/physmem.c @@ -8,11 +8,11 @@ * Software Foundation. */
-#include <common.h> #include <log.h> #include <mapmem.h> #include <physmem.h> #include <linux/compiler.h> +#include <linux/string.h>
phys_addr_t __weak arch_phys_memset(phys_addr_t s, int c, phys_size_t n) { diff --git a/lib/qsort.c b/lib/qsort.c index 2f18588dfccd..a2562c4942ea 100644 --- a/lib/qsort.c +++ b/lib/qsort.c @@ -17,7 +17,6 @@
#include <log.h> #include <linux/types.h> -#include <common.h> #include <exports.h> #include <sort.h>
diff --git a/lib/rand.c b/lib/rand.c index d256baf5cee7..d6f2977e8dcc 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -7,7 +7,6 @@ * Michael Walle michael@walle.cc */
-#include <common.h> #include <rand.h>
static unsigned int y = 1U; diff --git a/lib/rc4.c b/lib/rc4.c index 720112d1fd8e..3839924a2b2c 100644 --- a/lib/rc4.c +++ b/lib/rc4.c @@ -7,9 +7,6 @@ * Rivest Cipher 4 (RC4) implementation */
-#ifndef USE_HOSTCC -#include <common.h> -#endif #include <rc4.h>
void rc4_encode(unsigned char *buf, unsigned int len, const unsigned char key[16]) diff --git a/lib/rsa/rsa-keyprop.c b/lib/rsa/rsa-keyprop.c index 98855f67b890..80d0594a4303 100644 --- a/lib/rsa/rsa-keyprop.c +++ b/lib/rsa/rsa-keyprop.c @@ -9,7 +9,6 @@ * Copyright (c) 2016 Thomas Pornin pornin@bolet.org */
-#include <common.h> #include <image.h> #include <malloc.h> #include <crypto/internal/rsa.h> diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c index d259b2aedf27..5b3ea02f82f8 100644 --- a/lib/rsa/rsa-mod-exp.c +++ b/lib/rsa/rsa-mod-exp.c @@ -4,7 +4,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <fdtdec.h> #include <log.h> #include <asm/types.h> diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 2f3b34403913..e194e5433138 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -4,7 +4,6 @@ */
#ifndef USE_HOSTCC -#include <common.h> #include <fdtdec.h> #include <log.h> #include <malloc.h> diff --git a/lib/rtc-lib.c b/lib/rtc-lib.c index 1f7bdade298a..46dcfba27157 100644 --- a/lib/rtc-lib.c +++ b/lib/rtc-lib.c @@ -10,7 +10,6 @@ * - January is month 1. */
-#include <common.h> #include <rtc.h> #include <linux/math64.h>
diff --git a/lib/semihosting.c b/lib/semihosting.c index 831774e35664..9be5bffd3012 100644 --- a/lib/semihosting.c +++ b/lib/semihosting.c @@ -4,9 +4,10 @@ * Copyright 2014 Broadcom Corporation */
-#include <common.h> #include <log.h> #include <semihosting.h> +#include <linux/errno.h> +#include <linux/string.h>
#define SYSOPEN 0x01 #define SYSCLOSE 0x02 diff --git a/lib/slre.c b/lib/slre.c index e1a50443e046..277a59a03a71 100644 --- a/lib/slre.c +++ b/lib/slre.c @@ -21,8 +21,8 @@ #include <string.h> #else #include <log.h> -#include <common.h> #include <linux/ctype.h> +#include <linux/string.h> #endif /* SLRE_TEST */
#include <errno.h> diff --git a/lib/smbios-parser.c b/lib/smbios-parser.c index 2b9392936b99..b578c3084081 100644 --- a/lib/smbios-parser.c +++ b/lib/smbios-parser.c @@ -5,7 +5,6 @@
#define LOG_CATEGORY LOGC_BOOT
-#include <common.h> #include <smbios.h>
static inline int verify_checksum(const struct smbios_entry *e) diff --git a/lib/smbios.c b/lib/smbios.c index d7f4999e8b2a..807a021770cb 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -5,7 +5,6 @@ * Adapted from coreboot src/arch/x86/smbios.c */
-#include <common.h> #include <dm.h> #include <env.h> #include <linux/stringify.h> diff --git a/lib/strto.c b/lib/strto.c index 154921165cb2..5157332d6c1d 100644 --- a/lib/strto.c +++ b/lib/strto.c @@ -9,9 +9,9 @@ * Wirzenius wrote this portably, Torvalds fucked it up :-) */
-#include <common.h> #include <errno.h> #include <malloc.h> +#include <vsprintf.h> #include <linux/ctype.h>
/* from lib/kstrtox.c */ diff --git a/lib/tables_csum.c b/lib/tables_csum.c index e2630d57d912..636aa5967681 100644 --- a/lib/tables_csum.c +++ b/lib/tables_csum.c @@ -3,8 +3,7 @@ * Copyright (C) 2015, Bin Meng bmeng.cn@gmail.com */
-#include <common.h> -#include <linux/ctype.h> +#include <linux/types.h>
u8 table_compute_checksum(void *v, int len) { diff --git a/lib/time.c b/lib/time.c index 00f4a1ac8fb3..872f73d521e1 100644 --- a/lib/time.c +++ b/lib/time.c @@ -4,7 +4,6 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */
-#include <common.h> #include <clock_legacy.h> #include <bootstage.h> #include <dm.h> diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index f661fc65054a..9a70c6095b31 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -8,7 +8,6 @@ * Copyright (C) 2004,2008 Kustaa Nyholm */
-#include <common.h> #include <log.h> #include <serial.h> #include <stdarg.h> diff --git a/lib/tpm-common.c b/lib/tpm-common.c index 82ffdc5341bc..b592c22bfc13 100644 --- a/lib/tpm-common.c +++ b/lib/tpm-common.c @@ -6,7 +6,6 @@
#define LOG_CATEGORY UCLASS_TPM
-#include <common.h> #include <dm.h> #include <log.h> #include <asm/unaligned.h> diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c index 60a18ca50400..e66023da5e67 100644 --- a/lib/tpm-v1.c +++ b/lib/tpm-v1.c @@ -6,7 +6,6 @@
#define LOG_CATEGORY UCLASS_TPM
-#include <common.h> #include <dm.h> #include <log.h> #include <asm/unaligned.h> diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c index bd0fb078dc3c..68eaaa639f89 100644 --- a/lib/tpm-v2.c +++ b/lib/tpm-v2.c @@ -5,7 +5,6 @@ * Author: Miquel Raynal miquel.raynal@bootlin.com */
-#include <common.h> #include <dm.h> #include <dm/of_access.h> #include <tpm_api.h> diff --git a/lib/tpm_api.c b/lib/tpm_api.c index 3ef5e811794f..39a5121e3028 100644 --- a/lib/tpm_api.c +++ b/lib/tpm_api.c @@ -3,7 +3,6 @@ * Copyright 2019 Google LLC */
-#include <common.h> #include <dm.h> #include <log.h> #include <tpm_api.h> diff --git a/lib/trace.c b/lib/trace.c index 4874bef861bf..cabbe47b58a3 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -3,10 +3,10 @@ * Copyright (c) 2012 The Chromium OS Authors. */
-#include <common.h> #include <mapmem.h> #include <time.h> #include <trace.h> +#include <linux/errno.h> #include <asm/global_data.h> #include <asm/io.h> #include <asm/sections.h> diff --git a/lib/uuid.c b/lib/uuid.c index afb40bff507a..0be22bc05f78 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -9,7 +9,6 @@
#define LOG_CATEGOT LOGC_CORE
-#include <common.h> #include <command.h> #include <efi_api.h> #include <env.h> @@ -18,7 +17,6 @@ #include <uuid.h> #include <linux/ctype.h> #include <errno.h> -#include <common.h> #include <asm/io.h> #include <part_efi.h> #include <malloc.h> diff --git a/lib/vsprintf.c b/lib/vsprintf.c index e14c6ca9f966..27ea9c907a32 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -13,7 +13,6 @@ * from hush: simple_itoa() was lifted from boa-0.93.15 */
-#include <common.h> #include <charset.h> #include <efi_loader.h> #include <div64.h> diff --git a/lib/zstd/zstd.c b/lib/zstd/zstd.c index 3a2abc836734..14bde369068d 100644 --- a/lib/zstd/zstd.c +++ b/lib/zstd/zstd.c @@ -5,10 +5,10 @@
#define LOG_CATEGORY LOGC_BOOT
-#include <common.h> #include <abuf.h> #include <log.h> #include <malloc.h> +#include <linux/errno.h> #include <linux/zstd.h>
int zstd_decompress(struct abuf *in, struct abuf *out)
participants (2)
-
Simon Glass
-
Tom Rini