summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-04-30 20:40:48 -0600
committerTom Rini <trini@konsulko.com>2024-05-06 15:07:48 -0600
commit6a7185887b83a5cc334c7ce5bd65970381b2f4ce (patch)
treeb24fe505f1ec074073b0ff9d545a3a55b290a495
parent7410cde67de051ba6e7650ed6d714fb6b132c3f4 (diff)
downloadu-boot-6a7185887b83a5cc334c7ce5bd65970381b2f4ce.tar.gz
u-boot-6a7185887b83a5cc334c7ce5bd65970381b2f4ce.tar.bz2
u-boot-6a7185887b83a5cc334c7ce5bd65970381b2f4ce.zip
global: Make <asm/global_data.h> include <asm/u-boot.h>
This follows the example of RISC-V where <asm/global_data.h> includes <asm/u-boot.h> directly as "gd" includes a reference to bd_info already and so the first must include the second anyhow. We then remove <asm/u-boot.h> from all of the places which include references to "gd" an so have <asm/global_data.h> already. Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--api/api_platform-arm.c1
-rw-r--r--api/api_platform-mips.c1
-rw-r--r--api/api_platform-powerpc.c1
-rw-r--r--arch/arc/include/asm/global_data.h2
-rw-r--r--arch/arm/include/asm/global_data.h1
-rw-r--r--arch/arm/lib/bdinfo.c1
-rw-r--r--arch/arm/lib/cache-cp15.c1
-rw-r--r--arch/arm/mach-davinci/cpu.c1
-rw-r--r--arch/arm/mach-davinci/misc.c1
-rw-r--r--arch/arm/mach-davinci/spl.c1
-rw-r--r--arch/arm/mach-imx/ele_ahab.c1
-rw-r--r--arch/arm/mach-imx/mx5/mx53_dram.c1
-rw-r--r--arch/arm/mach-mediatek/mt7622/init.c1
-rw-r--r--arch/arm/mach-mediatek/mt7981/init.c1
-rw-r--r--arch/arm/mach-mediatek/mt7986/init.c1
-rw-r--r--arch/arm/mach-mediatek/mt7988/init.c1
-rw-r--r--arch/arm/mach-mvebu/armada8k/dram.c1
-rw-r--r--arch/arm/mach-mvebu/dram.c1
-rw-r--r--arch/arm/mach-omap2/omap-cache.c1
-rw-r--r--arch/arm/mach-omap2/omap3/emif4.c1
-rw-r--r--arch/arm/mach-omap2/omap3/sdrc.c1
-rw-r--r--arch/arm/mach-owl/soc.c1
-rw-r--r--arch/arm/mach-renesas/memmap-gen3.c1
-rw-r--r--arch/arm/mach-renesas/memmap-rzg2l.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager_agilex5.c1
-rw-r--r--arch/arm/mach-socfpga/spl_a10.c1
-rw-r--r--arch/arm/mach-socfpga/spl_agilex.c1
-rw-r--r--arch/arm/mach-socfpga/spl_gen5.c1
-rw-r--r--arch/arm/mach-socfpga/spl_n5x.c1
-rw-r--r--arch/arm/mach-socfpga/spl_s10.c1
-rw-r--r--arch/arm/mach-uniphier/dram_init.c1
-rw-r--r--arch/arm/mach-versal-net/clk.c1
-rw-r--r--arch/arm/mach-versal-net/cpu.c1
-rw-r--r--arch/arm/mach-versal/clk.c1
-rw-r--r--arch/arm/mach-versal/cpu.c1
-rw-r--r--arch/arm/mach-zynqmp/clk.c1
-rw-r--r--arch/arm/mach-zynqmp/cpu.c1
-rw-r--r--arch/m68k/include/asm/global_data.h2
-rw-r--r--arch/m68k/lib/bdinfo.c1
-rw-r--r--arch/microblaze/cpu/spl.c1
-rw-r--r--arch/microblaze/include/asm/global_data.h1
-rw-r--r--arch/mips/include/asm/global_data.h1
-rw-r--r--arch/mips/lib/traps.c1
-rw-r--r--arch/nios2/include/asm/global_data.h1
-rw-r--r--arch/powerpc/cpu/mpc83xx/interrupts.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/pcie.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/spd_sdram.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/speed.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/b4860_ids.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/cmd_errata.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p2041_ids.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/p2041_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p3041_ids.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p4080_ids.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p5040_ids.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/speed.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/spl_minimal.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/t1024_ids.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/t1024_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/t1040_ids.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/t1040_serdes.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/t2080_ids.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/t2080_serdes.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/t4240_ids.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/t4240_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fsl_lbc.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fsl_pamu.c4
-rw-r--r--arch/powerpc/cpu/mpc8xxx/law.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/pamu_table.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/srio.c3
-rw-r--r--arch/powerpc/include/asm/fsl_liodn.h4
-rw-r--r--arch/powerpc/include/asm/fsl_portals.h2
-rw-r--r--arch/powerpc/include/asm/global_data.h2
-rw-r--r--arch/powerpc/lib/bdinfo.c1
-rw-r--r--arch/riscv/lib/boot.c3
-rw-r--r--arch/sandbox/include/asm/global_data.h1
-rw-r--r--arch/sh/include/asm/global_data.h2
-rw-r--r--arch/x86/cpu/coreboot/sdram.c1
-rw-r--r--arch/x86/cpu/efi/payload.c1
-rw-r--r--arch/x86/cpu/efi/sdram.c1
-rw-r--r--arch/x86/cpu/ivybridge/sdram_nop.c1
-rw-r--r--arch/x86/cpu/qemu/dram.c1
-rw-r--r--arch/x86/cpu/quark/dram.c1
-rw-r--r--arch/x86/cpu/tangier/sdram.c1
-rw-r--r--arch/x86/include/asm/global_data.h1
-rw-r--r--arch/xtensa/include/asm/global_data.h2
-rw-r--r--board/keymile/kmcent2/tlb.c2
-rw-r--r--board/phytium/pe2201/pe2201.c1
-rw-r--r--board/phytium/pomelo/pomelo.c1
-rw-r--r--board/renesas/falcon/falcon.c1
-rw-r--r--board/renesas/grpeach/grpeach.c1
-rw-r--r--common/init/handoff.c1
-rw-r--r--common/spl/spl.c1
-rw-r--r--common/spl/spl_ext.c1
-rw-r--r--common/spl/spl_fat.c1
-rw-r--r--common/spl/spl_mmc.c1
-rw-r--r--common/spl/spl_sata.c1
-rw-r--r--common/spl/spl_usb.c1
-rw-r--r--common/spl/spl_ymodem.c1
-rw-r--r--drivers/clk/altera/clk-agilex5.c1
-rw-r--r--include/dm/of.h1
-rw-r--r--include/fsl_errata.h2
104 files changed, 48 insertions, 88 deletions
diff --git a/api/api_platform-arm.c b/api/api_platform-arm.c
index 6cfd9e6cc2..9afba66c24 100644
--- a/api/api_platform-arm.c
+++ b/api/api_platform-arm.c
@@ -12,7 +12,6 @@
#include <linux/types.h>
#include <api_public.h>
-#include <asm/u-boot.h>
#include <asm/global_data.h>
#include "api_private.h"
diff --git a/api/api_platform-mips.c b/api/api_platform-mips.c
index e1509663af..262b35a277 100644
--- a/api/api_platform-mips.c
+++ b/api/api_platform-mips.c
@@ -9,7 +9,6 @@
#include <linux/types.h>
#include <api_public.h>
-#include <asm/u-boot.h>
#include <asm/global_data.h>
#include "api_private.h"
diff --git a/api/api_platform-powerpc.c b/api/api_platform-powerpc.c
index 847a4a3015..3a04a9f691 100644
--- a/api/api_platform-powerpc.c
+++ b/api/api_platform-powerpc.c
@@ -12,7 +12,6 @@
#include <linux/types.h>
#include <api_public.h>
-#include <asm/u-boot.h>
#include <asm/global_data.h>
#include "api_private.h"
diff --git a/arch/arc/include/asm/global_data.h b/arch/arc/include/asm/global_data.h
index e35a26f1eb..fd9b7fb5f8 100644
--- a/arch/arc/include/asm/global_data.h
+++ b/arch/arc/include/asm/global_data.h
@@ -6,6 +6,8 @@
#ifndef __ASM_ARC_GLOBAL_DATA_H
#define __ASM_ARC_GLOBAL_DATA_H
+#include <asm/u-boot.h>
+
#ifndef __ASSEMBLY__
/* Architecture-specific global data */
struct arch_global_data {
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 452bcd1b8f..45401d5e3c 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -12,6 +12,7 @@
#include <config.h>
#include <linux/types.h>
+#include <asm/u-boot.h>
/* Architecture-specific global data */
struct arch_global_data {
diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index 40255ace40..7c49462c8e 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -9,7 +9,6 @@
#include <config.h>
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 0b2a0c3515..947012f299 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -7,7 +7,6 @@
#include <cpu_func.h>
#include <log.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/system.h>
#include <asm/cache.h>
#include <linux/compiler.h>
diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c
index 0334112353..7c0a263897 100644
--- a/arch/arm/mach-davinci/cpu.c
+++ b/arch/arm/mach-davinci/cpu.c
@@ -9,7 +9,6 @@
#include <init.h>
#include <asm/arch/hardware.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c
index 93a144757a..6c97e5810c 100644
--- a/arch/arm/mach-davinci/misc.c
+++ b/arch/arm/mach-davinci/misc.c
@@ -16,7 +16,6 @@
#include <net.h>
#include <asm/arch/hardware.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <asm/arch/davinci_misc.h>
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
index 4603c8fbc5..8c6cf9c219 100644
--- a/arch/arm/mach-davinci/spl.c
+++ b/arch/arm/mach-davinci/spl.c
@@ -7,7 +7,6 @@
#include <hang.h>
#include <init.h>
#include <spl.h>
-#include <asm/u-boot.h>
#include <asm/utils.h>
#include <nand.h>
#include <asm/arch/dm365_lowlevel.h>
diff --git a/arch/arm/mach-imx/ele_ahab.c b/arch/arm/mach-imx/ele_ahab.c
index eaeecf6004..c13d9f0e00 100644
--- a/arch/arm/mach-imx/ele_ahab.c
+++ b/arch/arm/mach-imx/ele_ahab.c
@@ -14,7 +14,6 @@
#include <console.h>
#include <cpu_func.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/mx5/mx53_dram.c b/arch/arm/mach-imx/mx5/mx53_dram.c
index 6459b4a82d..180a745d43 100644
--- a/arch/arm/mach-imx/mx5/mx53_dram.c
+++ b/arch/arm/mach-imx/mx5/mx53_dram.c
@@ -6,7 +6,6 @@
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
index 00d3eb9ce7..6e970acf8b 100644
--- a/arch/arm/mach-mediatek/mt7622/init.c
+++ b/arch/arm/mach-mediatek/mt7622/init.c
@@ -9,7 +9,6 @@
#include <asm/armv8/mmu.h>
#include <asm/system.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-mediatek/mt7981/init.c b/arch/arm/mach-mediatek/mt7981/init.c
index 862f0ca479..07da589719 100644
--- a/arch/arm/mach-mediatek/mt7981/init.c
+++ b/arch/arm/mach-mediatek/mt7981/init.c
@@ -9,7 +9,6 @@
#include <asm/armv8/mmu.h>
#include <asm/system.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-mediatek/mt7986/init.c b/arch/arm/mach-mediatek/mt7986/init.c
index 905a3ab4e2..a521c95bd9 100644
--- a/arch/arm/mach-mediatek/mt7986/init.c
+++ b/arch/arm/mach-mediatek/mt7986/init.c
@@ -9,7 +9,6 @@
#include <asm/armv8/mmu.h>
#include <asm/system.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-mediatek/mt7988/init.c b/arch/arm/mach-mediatek/mt7988/init.c
index 082f12bf65..2efc8c6a88 100644
--- a/arch/arm/mach-mediatek/mt7988/init.c
+++ b/arch/arm/mach-mediatek/mt7988/init.c
@@ -8,7 +8,6 @@
#include <init.h>
#include <asm/armv8/mmu.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/system.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-mvebu/armada8k/dram.c b/arch/arm/mach-mvebu/armada8k/dram.c
index 8a87e4a8e0..fd58551d0e 100644
--- a/arch/arm/mach-mvebu/armada8k/dram.c
+++ b/arch/arm/mach-mvebu/armada8k/dram.c
@@ -7,7 +7,6 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-mvebu/dram.c b/arch/arm/mach-mvebu/dram.c
index daf2f8e3f6..c00c6b9b3f 100644
--- a/arch/arm/mach-mvebu/dram.c
+++ b/arch/arm/mach-mvebu/dram.c
@@ -8,7 +8,6 @@
#include <config.h>
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index 132b205220..200a08fa5c 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -16,7 +16,6 @@
#include <linux/string.h>
#include <asm/cache.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index 79960bf46f..049eedfeb6 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -12,7 +12,6 @@
#include <config.h>
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index f08e4b3af5..404333689f 100644
--- a/arch/arm/mach-omap2/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
@@ -23,7 +23,6 @@
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c
index e6332452e3..0130cad767 100644
--- a/arch/arm/mach-owl/soc.c
+++ b/arch/arm/mach-owl/soc.c
@@ -10,7 +10,6 @@
#include <init.h>
#include <asm/cache.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <linux/arm-smccc.h>
#include <linux/psci.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-renesas/memmap-gen3.c b/arch/arm/mach-renesas/memmap-gen3.c
index 4dff9e0762..c50700df07 100644
--- a/arch/arm/mach-renesas/memmap-gen3.c
+++ b/arch/arm/mach-renesas/memmap-gen3.c
@@ -7,7 +7,6 @@
#include <asm/armv8/mmu.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <cpu_func.h>
#define GEN3_NR_REGIONS 16
diff --git a/arch/arm/mach-renesas/memmap-rzg2l.c b/arch/arm/mach-renesas/memmap-rzg2l.c
index 9934a77522..3b3c6f7cde 100644
--- a/arch/arm/mach-renesas/memmap-rzg2l.c
+++ b/arch/arm/mach-renesas/memmap-rzg2l.c
@@ -8,7 +8,6 @@
#include <asm/armv8/mmu.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <cpu_func.h>
#define RZG2L_NR_REGIONS 16
diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
index 4fcb13f17e..160f6e73ca 100644
--- a/arch/arm/mach-socfpga/clock_manager.c
+++ b/arch/arm/mach-socfpga/clock_manager.c
@@ -6,7 +6,6 @@
#include <asm/arch/clock_manager.h>
#include <asm/arch/system_manager.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <command.h>
#include <init.h>
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex5.c b/arch/arm/mach-socfpga/clock_manager_agilex5.c
index b92f0b3af8..7ec28d91ef 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex5.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex5.c
@@ -16,7 +16,6 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <asm/io.h>
-#include <asm/u-boot.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index af5bed162e..c20376f7f8 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -10,7 +10,6 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/pl310.h>
-#include <asm/u-boot.h>
#include <asm/utils.h>
#include <image.h>
#include <asm/arch/reset_manager.h>
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index cd1bf48d83..52617a39cc 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -8,7 +8,6 @@
#include <log.h>
#include <asm/global_data.h>
#include <asm/io.h>
-#include <asm/u-boot.h>
#include <asm/utils.h>
#include <hang.h>
#include <image.h>
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index d53592cba4..df79cfe0f7 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -8,7 +8,6 @@
#include <log.h>
#include <asm/global_data.h>
#include <asm/io.h>
-#include <asm/u-boot.h>
#include <asm/utils.h>
#include <image.h>
#include <asm/arch/reset_manager.h>
diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
index a196020393..5ff137e5c6 100644
--- a/arch/arm/mach-socfpga/spl_n5x.c
+++ b/arch/arm/mach-socfpga/spl_n5x.c
@@ -12,7 +12,6 @@
#include <asm/arch/system_manager.h>
#include <asm/global_data.h>
#include <asm/io.h>
-#include <asm/u-boot.h>
#include <asm/utils.h>
#include <dm/uclass.h>
#include <hang.h>
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index 9b3c75f976..53852cb744 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -9,7 +9,6 @@
#include <log.h>
#include <asm/global_data.h>
#include <asm/io.h>
-#include <asm/u-boot.h>
#include <asm/utils.h>
#include <debug_uart.h>
#include <image.h>
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index e6f1286e71..0e1164a268 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -12,7 +12,6 @@
#include <linux/printk.h>
#include <linux/sizes.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include "init.h"
#include "sg-regs.h"
diff --git a/arch/arm/mach-versal-net/clk.c b/arch/arm/mach-versal-net/clk.c
index a88b5101eb..61b8fe71b1 100644
--- a/arch/arm/mach-versal-net/clk.c
+++ b/arch/arm/mach-versal-net/clk.c
@@ -9,7 +9,6 @@
#include <init.h>
#include <time.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-versal-net/cpu.c b/arch/arm/mach-versal-net/cpu.c
index 59b0cb2e78..d088e440f6 100644
--- a/arch/arm/mach-versal-net/cpu.c
+++ b/arch/arm/mach-versal-net/cpu.c
@@ -10,7 +10,6 @@
#include <asm/armv8/mmu.h>
#include <asm/cache.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
index 0c7d468f1d..19943dfdd4 100644
--- a/arch/arm/mach-versal/clk.c
+++ b/arch/arm/mach-versal/clk.c
@@ -7,7 +7,6 @@
#include <init.h>
#include <time.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index 7de431e550..363ce3007f 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -8,7 +8,6 @@
#include <asm/armv8/mmu.h>
#include <asm/cache.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index dc8e2cbd3d..9b573b1746 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -10,7 +10,6 @@
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index d7b5e99504..07668c9468 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -13,7 +13,6 @@
#include <asm/armv8/mmu.h>
#include <asm/cache.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/io.h>
#include <zynqmp_firmware.h>
#include <asm/cache.h>
diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h
index c2ef5770a3..93efc722ba 100644
--- a/arch/m68k/include/asm/global_data.h
+++ b/arch/m68k/include/asm/global_data.h
@@ -7,6 +7,8 @@
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+#include <asm/u-boot.h>
+
/* Architecture-specific global data */
struct arch_global_data {
#ifdef CONFIG_SYS_I2C_FSL
diff --git a/arch/m68k/lib/bdinfo.c b/arch/m68k/lib/bdinfo.c
index 3719f11c03..cf6ae5addd 100644
--- a/arch/m68k/lib/bdinfo.c
+++ b/arch/m68k/lib/bdinfo.c
@@ -8,7 +8,6 @@
#include <config.h>
#include <init.h>
-#include <asm/u-boot.h>
#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index cb224bd254..5217767057 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -10,7 +10,6 @@
#include <log.h>
#include <spl.h>
#include <asm/io.h>
-#include <asm/u-boot.h>
#include <linux/stringify.h>
void board_boot_order(u32 *spl_boot_list)
diff --git a/arch/microblaze/include/asm/global_data.h b/arch/microblaze/include/asm/global_data.h
index 93506dec89..bb4112f22a 100644
--- a/arch/microblaze/include/asm/global_data.h
+++ b/arch/microblaze/include/asm/global_data.h
@@ -9,6 +9,7 @@
#define __ASM_GBL_DATA_H
#include <asm/cpuinfo.h>
+#include <asm/u-boot.h>
/* Architecture-specific global data */
struct arch_global_data {
diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h
index 34b7e0bed9..147a95ecea 100644
--- a/arch/mips/include/asm/global_data.h
+++ b/arch/mips/include/asm/global_data.h
@@ -9,6 +9,7 @@
#include <linux/types.h>
#include <asm/regdef.h>
+#include <asm/u-boot.h>
struct octeon_eeprom_mac_addr {
u8 mac_addr_base[6];
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index 40469d1be0..89846c9723 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -20,7 +20,6 @@
#include <asm/mipsregs.h>
#include <asm/addrspace.h>
#include <asm/system.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/nios2/include/asm/global_data.h b/arch/nios2/include/asm/global_data.h
index b56e8a5078..d9bbd54734 100644
--- a/arch/nios2/include/asm/global_data.h
+++ b/arch/nios2/include/asm/global_data.h
@@ -7,6 +7,7 @@
#define __ASM_NIOS2_GLOBALDATA_H_
#include <linux/types.h>
+#include <asm/u-boot.h>
/* Architecture-specific global data */
struct arch_global_data {
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index 6238eec605..d86c981811 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -6,7 +6,6 @@
* Copyright 2004 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <command.h>
#include <irq_func.h>
#include <mpc83xx.h>
diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c
index feecf8a819..efa30c6833 100644
--- a/arch/powerpc/cpu/mpc83xx/pcie.c
+++ b/arch/powerpc/cpu/mpc83xx/pcie.c
@@ -7,7 +7,6 @@
* Anton Vorontsov <avorontsov@ru.mvista.com>
*/
-#include <asm/u-boot.h>
#include <clock_legacy.h>
#include <pci.h>
#include <mpc83xx.h>
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index 37234e00ab..e847c03f37 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -12,7 +12,6 @@
#ifndef CONFIG_MPC83XX_SDRAM
-#include <asm/u-boot.h>
#include <cpu_func.h>
#include <log.h>
#include <time.h>
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index bfc6242321..7246496261 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -8,7 +8,6 @@
#ifndef CONFIG_CLK_MPC83XX
-#include <asm/u-boot.h>
#include <clock_legacy.h>
#include <mpc83xx.h>
#include <command.h>
diff --git a/arch/powerpc/cpu/mpc85xx/b4860_ids.c b/arch/powerpc/cpu/mpc85xx/b4860_ids.c
index 39cfd20129..df2f0efe3e 100644
--- a/arch/powerpc/cpu/mpc85xx/b4860_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/b4860_ids.c
@@ -4,6 +4,7 @@
*/
#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 01763b54e8..f91a4d441d 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -3,7 +3,6 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <command.h>
#include <init.h>
#include <linux/compiler.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index 3383bb5c9b..945020f7ec 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -3,7 +3,6 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <log.h>
#include <asm/fsl_serdes.h>
#include <asm/immap_85xx.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p2041_ids.c b/arch/powerpc/cpu/mpc85xx/p2041_ids.c
index 67a21e15a6..ae5227a1ee 100644
--- a/arch/powerpc/cpu/mpc85xx/p2041_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p2041_ids.c
@@ -3,7 +3,8 @@
* Copyright 2011 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p2041_serdes.c b/arch/powerpc/cpu/mpc85xx/p2041_serdes.c
index d915665df8..3943859a51 100644
--- a/arch/powerpc/cpu/mpc85xx/p2041_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p2041_serdes.c
@@ -3,7 +3,6 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <asm/fsl_serdes.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p3041_ids.c b/arch/powerpc/cpu/mpc85xx/p3041_ids.c
index e5d600fa2a..0675a59414 100644
--- a/arch/powerpc/cpu/mpc85xx/p3041_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p3041_ids.c
@@ -4,6 +4,7 @@
*/
#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p4080_ids.c b/arch/powerpc/cpu/mpc85xx/p4080_ids.c
index 2505041283..15ab4ac938 100644
--- a/arch/powerpc/cpu/mpc85xx/p4080_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p4080_ids.c
@@ -4,6 +4,7 @@
*/
#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p5040_ids.c b/arch/powerpc/cpu/mpc85xx/p5040_ids.c
index de1d372631..0a34e066e9 100644
--- a/arch/powerpc/cpu/mpc85xx/p5040_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p5040_ids.c
@@ -4,6 +4,7 @@
*/
#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index 1a4ee87cb3..a7e1b3c98a 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -9,7 +9,6 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
-#include <asm/u-boot.h>
#include <cpu_func.h>
#include <clock_legacy.h>
#include <ppc_asm.tmpl>
diff --git a/arch/powerpc/cpu/mpc85xx/spl_minimal.c b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
index e7031c1338..29318fad5f 100644
--- a/arch/powerpc/cpu/mpc85xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
@@ -3,7 +3,6 @@
* Copyright 2009 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <asm/processor.h>
#include <asm/global_data.h>
#include <fsl_ifc.h>
diff --git a/arch/powerpc/cpu/mpc85xx/t1024_ids.c b/arch/powerpc/cpu/mpc85xx/t1024_ids.c
index 01a62b8692..7239d28f93 100644
--- a/arch/powerpc/cpu/mpc85xx/t1024_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/t1024_ids.c
@@ -3,7 +3,8 @@
* Copyright 2014 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/t1024_serdes.c b/arch/powerpc/cpu/mpc85xx/t1024_serdes.c
index 3ab743c3d6..0d958fe131 100644
--- a/arch/powerpc/cpu/mpc85xx/t1024_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t1024_serdes.c
@@ -3,7 +3,6 @@
* Copyright 2014 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <asm/fsl_serdes.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc85xx/t1040_ids.c b/arch/powerpc/cpu/mpc85xx/t1040_ids.c
index d0f9b0ca75..bb92fc392c 100644
--- a/arch/powerpc/cpu/mpc85xx/t1040_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/t1040_ids.c
@@ -3,7 +3,8 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/t1040_serdes.c b/arch/powerpc/cpu/mpc85xx/t1040_serdes.c
index 1f1b23a3aa..2033ebbaa5 100644
--- a/arch/powerpc/cpu/mpc85xx/t1040_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t1040_serdes.c
@@ -3,10 +3,11 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <linux/kernel.h>
#include <asm/fsl_serdes.h>
#include <asm/processor.h>
#include <asm/io.h>
+#include <asm/ppc.h>
static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = {
diff --git a/arch/powerpc/cpu/mpc85xx/t2080_ids.c b/arch/powerpc/cpu/mpc85xx/t2080_ids.c
index 51ac367dd8..26a2d745a8 100644
--- a/arch/powerpc/cpu/mpc85xx/t2080_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/t2080_ids.c
@@ -3,7 +3,8 @@
* Copyright 2013 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/t2080_serdes.c b/arch/powerpc/cpu/mpc85xx/t2080_serdes.c
index 16fa16b080..6702acaf77 100644
--- a/arch/powerpc/cpu/mpc85xx/t2080_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t2080_serdes.c
@@ -5,9 +5,10 @@
* Shengzhou Liu <Shengzhou.Liu@freescale.com>
*/
-#include <asm/u-boot.h>
+#include <linux/kernel.h>
#include <asm/fsl_serdes.h>
#include <asm/processor.h>
+#include <asm/ppc.h>
#include "fsl_corenet2_serdes.h"
struct serdes_config {
diff --git a/arch/powerpc/cpu/mpc85xx/t4240_ids.c b/arch/powerpc/cpu/mpc85xx/t4240_ids.c
index 94b4409cec..c319bf5cff 100644
--- a/arch/powerpc/cpu/mpc85xx/t4240_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/t4240_ids.c
@@ -3,7 +3,8 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
+#include <linux/kernel.h>
#include <asm/fsl_portals.h>
#include <asm/fsl_liodn.h>
diff --git a/arch/powerpc/cpu/mpc85xx/t4240_serdes.c b/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
index 956b5ea37a..36fe34f11e 100644
--- a/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
@@ -3,7 +3,6 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <asm/fsl_serdes.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
index c7bae5a881..843dd191cc 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
@@ -3,7 +3,6 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <hang.h>
#include <init.h>
#include <asm/fsl_lbc.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
index 523367ddf1..29399bcd8b 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
@@ -5,12 +5,14 @@
* Copyright 2012-2016 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
#include <log.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include <malloc.h>
#include <asm/fsl_pamu.h>
+#include <asm/io.h>
+#include <asm/ppc.h>
struct paace *ppaact;
struct paace *sec;
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index 5c6e26b9aa..f16bc19966 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -6,7 +6,6 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
-#include <asm/u-boot.h>
#include <display_options.h>
#include <asm/bitops.h>
#include <asm/global_data.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index e55173a890..831a11736c 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -3,7 +3,6 @@
* Copyright 2012-2016 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
#include <log.h>
#include <asm/fsl_pamu.h>
#include <asm/global_data.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c
index 185cbabbcd..0c7288c757 100644
--- a/arch/powerpc/cpu/mpc8xxx/srio.c
+++ b/arch/powerpc/cpu/mpc8xxx/srio.c
@@ -3,12 +3,13 @@
* Copyright 2011 Freescale Semiconductor, Inc.
*/
-#include <asm/u-boot.h>
+#include <config.h>
#include <log.h>
#include <time.h>
#include <asm/fsl_law.h>
#include <asm/fsl_serdes.h>
#include <asm/fsl_srio.h>
+#include <asm/ppc.h>
#include <linux/delay.h>
#include <linux/errno.h>
diff --git a/arch/powerpc/include/asm/fsl_liodn.h b/arch/powerpc/include/asm/fsl_liodn.h
index 0af3d8902a..4ce869b5c1 100644
--- a/arch/powerpc/include/asm/fsl_liodn.h
+++ b/arch/powerpc/include/asm/fsl_liodn.h
@@ -6,7 +6,9 @@
#ifndef _FSL_LIODN_H_
#define _FSL_LIODN_H_
-#include <asm/types.h>
+#include <config.h>
+#include <linux/types.h>
+#include <asm/ppc.h>
#include <fsl_qbman.h>
struct srio_liodn_id_table {
diff --git a/arch/powerpc/include/asm/fsl_portals.h b/arch/powerpc/include/asm/fsl_portals.h
index 54ef4fb629..021eec7238 100644
--- a/arch/powerpc/include/asm/fsl_portals.h
+++ b/arch/powerpc/include/asm/fsl_portals.h
@@ -6,6 +6,8 @@
#ifndef _FSL_PORTALS_H_
#define _FSL_PORTALS_H_
+#include <linux/types.h>
+
/* entries must be in order and contiguous */
enum fsl_dpaa_dev {
FSL_HW_PORTAL_SEC,
diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
index f7860122a0..a9efbbdd3d 100644
--- a/arch/powerpc/include/asm/global_data.h
+++ b/arch/powerpc/include/asm/global_data.h
@@ -93,4 +93,6 @@ struct arch_global_data {
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
+#include <asm/u-boot.h>
+
#endif /* __ASM_GBL_DATA_H */
diff --git a/arch/powerpc/lib/bdinfo.c b/arch/powerpc/lib/bdinfo.c
index c12e4c6371..6491c210f4 100644
--- a/arch/powerpc/lib/bdinfo.c
+++ b/arch/powerpc/lib/bdinfo.c
@@ -8,7 +8,6 @@
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/boot.c b/arch/riscv/lib/boot.c
index 03014c56dc..161335abee 100644
--- a/arch/riscv/lib/boot.c
+++ b/arch/riscv/lib/boot.c
@@ -4,7 +4,8 @@
* Rick Chen, Andes Technology Corporation <rick@andestech.com>
*/
-#include <asm/u-boot.h>
+#include <linux/types.h>
+#include <asm/u-boot-riscv.h>
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
int argc, char *const argv[])
diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h
index 001b2b53c1..309422f75e 100644
--- a/arch/sandbox/include/asm/global_data.h
+++ b/arch/sandbox/include/asm/global_data.h
@@ -10,6 +10,7 @@
#define __ASM_GBL_DATA_H
#include <linux/types.h>
+#include <asm/u-boot.h>
/* Architecture-specific global data */
struct arch_global_data {
diff --git a/arch/sh/include/asm/global_data.h b/arch/sh/include/asm/global_data.h
index bd946ffd8f..933c302d68 100644
--- a/arch/sh/include/asm/global_data.h
+++ b/arch/sh/include/asm/global_data.h
@@ -10,6 +10,8 @@
#ifndef __ASM_SH_GLOBALDATA_H_
#define __ASM_SH_GLOBALDATA_H_
+#include <asm/u-boot.h>
+
/* Architecture-specific global data */
struct arch_global_data {
};
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index ee0491eab1..013225f129 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -9,7 +9,6 @@
#include <asm/e820.h>
#include <asm/cb_sysinfo.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index cb57f15f71..642a87a37d 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -16,7 +16,6 @@
#include <asm/e820.h>
#include <asm/global_data.h>
#include <asm/post.h>
-#include <asm/u-boot.h>
#include <asm/u-boot-x86.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c
index 1f0e87735b..6fe4007114 100644
--- a/arch/x86/cpu/efi/sdram.c
+++ b/arch/x86/cpu/efi/sdram.c
@@ -6,7 +6,6 @@
#include <efi.h>
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
#include <asm/u-boot-x86.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c
index e7ec35bbe2..d20c9a2a37 100644
--- a/arch/x86/cpu/ivybridge/sdram_nop.c
+++ b/arch/x86/cpu/ivybridge/sdram_nop.c
@@ -5,7 +5,6 @@
#include <init.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c
index 6ac363f3d8..62a301c0fd 100644
--- a/arch/x86/cpu/qemu/dram.c
+++ b/arch/x86/cpu/qemu/dram.c
@@ -7,7 +7,6 @@
#include <asm/global_data.h>
#include <asm/post.h>
#include <asm/arch/qemu.h>
-#include <asm/u-boot.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 7d32b98e8d..34e576940d 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -17,7 +17,6 @@
#include <asm/arch/mrc.h>
#include <asm/arch/msg_port.h>
#include <asm/arch/quark.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c
index 7e1d290fc5..6192f2296b 100644
--- a/arch/x86/cpu/tangier/sdram.c
+++ b/arch/x86/cpu/tangier/sdram.c
@@ -8,7 +8,6 @@
#include <asm/e820.h>
#include <asm/global_data.h>
#include <asm/sfi.h>
-#include <asm/u-boot.h>
#include <linux/printk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 1ef7f1f034..06bd80ccc1 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -12,6 +12,7 @@
#include <linux/types.h>
#include <asm/processor.h>
#include <asm/mrccache.h>
+#include <asm/u-boot.h>
enum pei_boot_mode_t {
PEI_BOOT_NONE = 0,
diff --git a/arch/xtensa/include/asm/global_data.h b/arch/xtensa/include/asm/global_data.h
index 1157978ab6..40c129db4a 100644
--- a/arch/xtensa/include/asm/global_data.h
+++ b/arch/xtensa/include/asm/global_data.h
@@ -6,6 +6,8 @@
#ifndef _XTENSA_GBL_DATA_H
#define _XTENSA_GBL_DATA_H
+#include <asm/u-boot.h>
+
/* Architecture-specific global data */
struct arch_global_data {
diff --git a/board/keymile/kmcent2/tlb.c b/board/keymile/kmcent2/tlb.c
index 41b24e3943..77e11e9bc1 100644
--- a/board/keymile/kmcent2/tlb.c
+++ b/board/keymile/kmcent2/tlb.c
@@ -7,7 +7,7 @@
*/
#include <asm/mmu.h>
-#include <asm/u-boot.h>
+#include <asm/ppc.h>
struct fsl_e_tlb_entry tlb_table[] = {
/* TLB 0 - for temp stack in cache */
diff --git a/board/phytium/pe2201/pe2201.c b/board/phytium/pe2201/pe2201.c
index 0e837b0f50..fbbf6789b5 100644
--- a/board/phytium/pe2201/pe2201.c
+++ b/board/phytium/pe2201/pe2201.c
@@ -12,7 +12,6 @@
#include <asm/io.h>
#include <linux/arm-smccc.h>
#include <scsi.h>
-#include <asm/u-boot.h>
#include "cpu.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/phytium/pomelo/pomelo.c b/board/phytium/pomelo/pomelo.c
index 960e491c76..0ea335e748 100644
--- a/board/phytium/pomelo/pomelo.c
+++ b/board/phytium/pomelo/pomelo.c
@@ -14,7 +14,6 @@
#include <linux/arm-smccc.h>
#include <scsi.h>
#include <init.h>
-#include <asm/u-boot.h>
#include "cpu.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/falcon/falcon.c b/board/renesas/falcon/falcon.c
index 27fccacf6f..c88257d967 100644
--- a/board/renesas/falcon/falcon.c
+++ b/board/renesas/falcon/falcon.c
@@ -14,7 +14,6 @@
#include <asm/processor.h>
#include <linux/errno.h>
#include <asm/system.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
index c475c3f50a..88f65c3b6a 100644
--- a/board/renesas/grpeach/grpeach.c
+++ b/board/renesas/grpeach/grpeach.c
@@ -10,7 +10,6 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
-#include <asm/u-boot.h>
#define RZA1_WDT_BASE 0xfcfe0000
#define WTCSR 0x00
diff --git a/common/init/handoff.c b/common/init/handoff.c
index 687513bda3..a7cd065fb3 100644
--- a/common/init/handoff.c
+++ b/common/init/handoff.c
@@ -7,7 +7,6 @@
#include <handoff.h>
#include <asm/global_data.h>
-#include <asm/u-boot.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4e92771eca..9a879e9fb1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -23,7 +23,6 @@
#include <system-constants.h>
#include <asm/global_data.h>
#include <asm-generic/gpio.h>
-#include <asm/u-boot.h>
#include <nand.h>
#include <fat.h>
#include <u-boot/crc.h>
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index 2399e1d806..76f49a5a8a 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -4,7 +4,6 @@
#include <part.h>
#include <spl.h>
#include <spl_load.h>
-#include <asm/u-boot.h>
#include <ext4fs.h>
#include <errno.h>
#include <image.h>
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 2e320ba7c0..bd8aab253a 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -12,7 +12,6 @@
#include <log.h>
#include <spl.h>
#include <spl_load.h>
-#include <asm/u-boot.h>
#include <fat.h>
#include <errno.h>
#include <image.h>
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index f4481b9046..ccab0be4be 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -12,7 +12,6 @@
#include <spl_load.h>
#include <linux/compiler.h>
#include <errno.h>
-#include <asm/u-boot.h>
#include <errno.h>
#include <mmc.h>
#include <image.h>
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 18acc40e46..67fc620d9b 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -9,7 +9,6 @@
*/
#include <spl.h>
-#include <asm/u-boot.h>
#include <sata.h>
#include <scsi.h>
#include <errno.h>
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index 31fc4b57d4..932da56ab6 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -10,7 +10,6 @@
#include <log.h>
#include <spl.h>
-#include <asm/u-boot.h>
#include <errno.h>
#include <usb.h>
#include <fat.h>
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index fd48f80f75..4c7222af61 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -13,7 +13,6 @@
#include <log.h>
#include <spl.h>
#include <xyzModem.h>
-#include <asm/u-boot.h>
#include <linux/libfdt.h>
#define BUF_SIZE 1024
diff --git a/drivers/clk/altera/clk-agilex5.c b/drivers/clk/altera/clk-agilex5.c
index 92f2abdaf9..72b923465d 100644
--- a/drivers/clk/altera/clk-agilex5.c
+++ b/drivers/clk/altera/clk-agilex5.c
@@ -15,7 +15,6 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/system.h>
-#include <asm/u-boot.h>
#include <dm/lists.h>
#include <dm/util.h>
#include <linux/bitops.h>
diff --git a/include/dm/of.h b/include/dm/of.h
index b1c934f610..b7404c139d 100644
--- a/include/dm/of.h
+++ b/include/dm/of.h
@@ -7,7 +7,6 @@
#ifndef _DM_OF_H
#define _DM_OF_H
-#include <asm/u-boot.h>
#include <asm/global_data.h>
/* integer value within a device tree property which references another node */
diff --git a/include/fsl_errata.h b/include/fsl_errata.h
index 44547645df..9f070726ac 100644
--- a/include/fsl_errata.h
+++ b/include/fsl_errata.h
@@ -7,7 +7,7 @@
#define _FSL_ERRATA_H
#if defined(CONFIG_PPC)
-#include <asm/processor.h>
+#include <asm/ppc.h>
#elif defined(CONFIG_ARCH_LS1021A)
#include <asm/arch-ls102xa/immap_ls102xa.h>
#elif defined(CONFIG_FSL_LAYERSCAPE)