aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini2019-12-02 22:05:35 -0500
committerTom Rini2019-12-02 22:05:35 -0500
commita4ef0657e3075d0f951d78cc1398cb7e05af648a (patch)
tree9a4387de5845e6fd1331f0af32bfd82fac9eb039 /arch
parent357040645f9f56b33909520483df9f840be7e181 (diff)
parentcb3ef6810a27c8ddf5db8694bcef9337f27d12ce (diff)
Merge branch '2019-12-02-master-imports'
- A large series of clean-ups to reduce common.h contents
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/lib/bootm.c1
-rw-r--r--arch/arc/lib/cache.c1
-rw-r--r--arch/arc/lib/cpu.c1
-rw-r--r--arch/arc/lib/interrupts.c1
-rw-r--r--arch/arm/cpu/arm11/cpu.c4
-rw-r--r--arch/arm/cpu/arm920t/cpu.c4
-rw-r--r--arch/arm/cpu/arm920t/ep93xx/timer.c1
-rw-r--r--arch/arm/cpu/arm920t/imx/timer.c1
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/cpu.c1
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/timer.c1
-rw-r--r--arch/arm/cpu/arm926ejs/cache.c1
-rw-r--r--arch/arm/cpu/arm926ejs/cpu.c4
-rw-r--r--arch/arm/cpu/arm926ejs/lpc32xx/cpu.c1
-rw-r--r--arch/arm/cpu/arm926ejs/lpc32xx/timer.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/generic.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mx27/generic.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mx27/timer.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_boot.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/timer.c1
-rw-r--r--arch/arm/cpu/arm926ejs/spear/spr_misc.c1
-rw-r--r--arch/arm/cpu/arm926ejs/spear/timer.c1
-rw-r--r--arch/arm/cpu/arm946es/cpu.c4
-rw-r--r--arch/arm/cpu/armv7/arch_timer.c1
-rw-r--r--arch/arm/cpu/armv7/cache_v7.c1
-rw-r--r--arch/arm/cpu/armv7/cpu.c2
-rw-r--r--arch/arm/cpu/armv7/exception_level.c1
-rw-r--r--arch/arm/cpu/armv7/iproc-common/hwinit-common.c1
-rw-r--r--arch/arm/cpu/armv7/iproc-common/timer.c1
-rw-r--r--arch/arm/cpu/armv7/kona-common/hwinit-common.c1
-rw-r--r--arch/arm/cpu/armv7/ls102xa/cpu.c2
-rw-r--r--arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c1
-rw-r--r--arch/arm/cpu/armv7/ls102xa/timer.c1
-rw-r--r--arch/arm/cpu/armv7/mpu_v7r.c1
-rw-r--r--arch/arm/cpu/armv7/s5p-common/timer.c1
-rw-r--r--arch/arm/cpu/armv7/stv0991/timer.c1
-rw-r--r--arch/arm/cpu/armv7/sunxi/timer.c1
-rw-r--r--arch/arm/cpu/armv7/vf610/generic.c1
-rw-r--r--arch/arm/cpu/armv7/vf610/timer.c1
-rw-r--r--arch/arm/cpu/armv7/virt-v7.c1
-rw-r--r--arch/arm/cpu/armv7m/cache.c1
-rw-r--r--arch/arm/cpu/armv7m/cpu.c2
-rw-r--r--arch/arm/cpu/armv7m/systick-timer.c1
-rw-r--r--arch/arm/cpu/armv8/cache_v8.c1
-rw-r--r--arch/arm/cpu/armv8/cpu.c2
-rw-r--r--arch/arm/cpu/armv8/exception_level.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/cpu.c3
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/mp.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/soc.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/spl.c1
-rw-r--r--arch/arm/cpu/armv8/generic_timer.c1
-rw-r--r--arch/arm/cpu/armv8/s32v234/cpu.c1
-rw-r--r--arch/arm/cpu/armv8/sec_firmware.c1
-rw-r--r--arch/arm/cpu/pxa/cache.c1
-rw-r--r--arch/arm/cpu/pxa/pxa2xx.c14
-rw-r--r--arch/arm/cpu/sa1100/cpu.c4
-rw-r--r--arch/arm/cpu/sa1100/timer.c1
-rw-r--r--arch/arm/lib/bootm.c1
-rw-r--r--arch/arm/lib/cache-cp15.c13
-rw-r--r--arch/arm/lib/cache.c1
-rw-r--r--arch/arm/lib/interrupts.c7
-rw-r--r--arch/arm/lib/interrupts_64.c1
-rw-r--r--arch/arm/lib/interrupts_m.c1
-rw-r--r--arch/arm/lib/reset.c1
-rw-r--r--arch/arm/mach-at91/arm920t/timer.c1
-rw-r--r--arch/arm/mach-at91/arm926ejs/cpu.c1
-rw-r--r--arch/arm/mach-at91/armv7/cpu.c2
-rw-r--r--arch/arm/mach-bcm283x/init.c1
-rw-r--r--arch/arm/mach-bcm283x/mbox.c1
-rw-r--r--arch/arm/mach-davinci/timer.c1
-rw-r--r--arch/arm/mach-exynos/soc.c1
-rw-r--r--arch/arm/mach-imx/cache.c1
-rw-r--r--arch/arm/mach-imx/imx8/cpu.c1
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c1
-rw-r--r--arch/arm/mach-imx/mx5/soc.c1
-rw-r--r--arch/arm/mach-imx/mx6/mp.c1
-rw-r--r--arch/arm/mach-imx/mx6/opos6ul.c1
-rw-r--r--arch/arm/mach-imx/mx6/soc.c1
-rw-r--r--arch/arm/mach-imx/mx7/psci-mx7.c1
-rw-r--r--arch/arm/mach-imx/mx7ulp/soc.c1
-rw-r--r--arch/arm/mach-imx/syscounter.c1
-rw-r--r--arch/arm/mach-imx/timer.c1
-rw-r--r--arch/arm/mach-keystone/init.c1
-rw-r--r--arch/arm/mach-kirkwood/cpu.c1
-rw-r--r--arch/arm/mach-mediatek/cpu.c1
-rw-r--r--arch/arm/mach-meson/board-common.c2
-rw-r--r--arch/arm/mach-mvebu/arm64-common.c1
-rw-r--r--arch/arm/mach-mvebu/armada8k/cpu.c1
-rw-r--r--arch/arm/mach-mvebu/cpu.c1
-rw-r--r--arch/arm/mach-omap2/omap-cache.c1
-rw-r--r--arch/arm/mach-omap2/sec-common.c1
-rw-r--r--arch/arm/mach-omap2/timer.c1
-rw-r--r--arch/arm/mach-orion5x/cpu.c1
-rw-r--r--arch/arm/mach-orion5x/timer.c1
-rw-r--r--arch/arm/mach-rmobile/cpu_info.c1
-rw-r--r--arch/arm/mach-rmobile/memmap-gen3.c1
-rw-r--r--arch/arm/mach-rmobile/timer.c1
-rw-r--r--arch/arm/mach-rockchip/board.c2
-rw-r--r--arch/arm/mach-rockchip/misc.c1
-rw-r--r--arch/arm/mach-rockchip/rk3288/rk3288.c1
-rw-r--r--arch/arm/mach-rockchip/sdram.c1
-rw-r--r--arch/arm/mach-s5pc1xx/cache.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager_gen5.c1
-rw-r--r--arch/arm/mach-socfpga/misc.c1
-rw-r--r--arch/arm/mach-socfpga/spl_a10.c1
-rw-r--r--arch/arm/mach-stm32mp/cpu.c1
-rw-r--r--arch/arm/mach-sunxi/board.c1
-rw-r--r--arch/arm/mach-sunxi/dram_helpers.c1
-rw-r--r--arch/arm/mach-sunxi/p2wi.c1
-rw-r--r--arch/arm/mach-sunxi/rsb.c1
-rw-r--r--arch/arm/mach-tegra/board.c1
-rw-r--r--arch/arm/mach-tegra/board2.c1
-rw-r--r--arch/arm/mach-tegra/clock.c1
-rw-r--r--arch/arm/mach-tegra/cmd_enterrcm.c1
-rw-r--r--arch/arm/mach-tegra/ivc.c1
-rw-r--r--arch/arm/mach-uniphier/arm32/cache-uniphier.c1
-rw-r--r--arch/arm/mach-uniphier/arm32/psci.c1
-rw-r--r--arch/arm/mach-uniphier/board_late_init.c1
-rw-r--r--arch/arm/mach-zynq/cpu.c1
-rw-r--r--arch/arm/mach-zynqmp/mp.c1
-rw-r--r--arch/arm/mach-zynqmp/spl.c1
-rw-r--r--arch/m68k/cpu/mcf5227x/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf5227x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf5227x/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf523x/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf523x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf523x/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf52x2/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf52x2/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf52x2/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf530x/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf530x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf530x/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf532x/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf532x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf532x/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf5445x/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf5445x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf5445x/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/cpu.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/interrupts.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/slicetimer.c1
-rw-r--r--arch/m68k/lib/cache.c1
-rw-r--r--arch/m68k/lib/interrupts.c9
-rw-r--r--arch/m68k/lib/time.c2
-rw-r--r--arch/m68k/lib/traps.c1
-rw-r--r--arch/microblaze/cpu/cache.c19
-rw-r--r--arch/microblaze/cpu/interrupts.c1
-rw-r--r--arch/microblaze/cpu/timer.c1
-rw-r--r--arch/microblaze/include/asm/microblaze_intc.h2
-rw-r--r--arch/microblaze/lib/bootm.c1
-rw-r--r--arch/mips/cpu/interrupts.c1
-rw-r--r--arch/mips/lib/cache.c1
-rw-r--r--arch/mips/lib/reloc.c1
-rw-r--r--arch/mips/lib/traps.c2
-rw-r--r--arch/mips/mach-jz47xx/jz4780/jz4780.c2
-rw-r--r--arch/mips/mach-jz47xx/jz4780/timer.c2
-rw-r--r--arch/mips/mach-mtmips/ddr_calibrate.c1
-rw-r--r--arch/nds32/cpu/n1213/ae3xx/cpu.c2
-rw-r--r--arch/nds32/cpu/n1213/ag101/cpu.c2
-rw-r--r--arch/nds32/cpu/n1213/ag101/timer.c2
-rw-r--r--arch/nds32/lib/cache.c1
-rw-r--r--arch/nds32/lib/interrupts.c1
-rw-r--r--arch/nios2/cpu/cpu.c2
-rw-r--r--arch/nios2/cpu/interrupts.c15
-rw-r--r--arch/nios2/lib/bootm.c2
-rw-r--r--arch/nios2/lib/cache.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu.c5
-rw-r--r--arch/powerpc/cpu/mpc83xx/ecc.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/interrupts.c7
-rw-r--r--arch/powerpc/cpu/mpc83xx/spd_sdram.c2
-rw-r--r--arch/powerpc/cpu/mpc83xx/speed.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu.c3
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/interrupts.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mp.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/speed.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/traps.c1
-rw-r--r--arch/powerpc/cpu/mpc86xx/cpu.c2
-rw-r--r--arch/powerpc/cpu/mpc86xx/interrupts.c3
-rw-r--r--arch/powerpc/cpu/mpc86xx/mp.c1
-rw-r--r--arch/powerpc/cpu/mpc8xx/cache.c1
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu.c132
-rw-r--r--arch/powerpc/cpu/mpc8xx/interrupts.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/cpu.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fdt.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/srio.c1
-rw-r--r--arch/powerpc/lib/bootm.c1
-rw-r--r--arch/powerpc/lib/cache.c1
-rw-r--r--arch/powerpc/lib/interrupts.c24
-rw-r--r--arch/powerpc/lib/time.c1
-rw-r--r--arch/riscv/cpu/ax25/cache.c1
-rw-r--r--arch/riscv/cpu/ax25/cpu.c2
-rw-r--r--arch/riscv/cpu/generic/cpu.c1
-rw-r--r--arch/riscv/cpu/generic/dram.c1
-rw-r--r--arch/riscv/lib/cache.c1
-rw-r--r--arch/riscv/lib/interrupts.c1
-rw-r--r--arch/riscv/lib/smp.c1
-rw-r--r--arch/riscv/lib/spl.c1
-rw-r--r--arch/sandbox/cpu/cpu.c1
-rw-r--r--arch/sandbox/cpu/start.c1
-rw-r--r--arch/sandbox/lib/interrupts.c1
-rw-r--r--arch/sh/cpu/sh4/cache.c1
-rw-r--r--arch/sh/cpu/sh4/cpu.c2
-rw-r--r--arch/sh/cpu/sh4/interrupts.c7
-rw-r--r--arch/sh/lib/time_sh2.c1
-rw-r--r--arch/sh/lib/zimageboot.c1
-rw-r--r--arch/x86/cpu/broadwell/cpu_from_spl.c1
-rw-r--r--arch/x86/cpu/broadwell/sdram.c1
-rw-r--r--arch/x86/cpu/coreboot/coreboot.c1
-rw-r--r--arch/x86/cpu/coreboot/sdram.c1
-rw-r--r--arch/x86/cpu/cpu.c1
-rw-r--r--arch/x86/cpu/efi/app.c1
-rw-r--r--arch/x86/cpu/efi/payload.c2
-rw-r--r--arch/x86/cpu/efi/sdram.c1
-rw-r--r--arch/x86/cpu/i386/cpu.c1
-rw-r--r--arch/x86/cpu/i386/interrupt.c1
-rw-r--r--arch/x86/cpu/intel_common/mrc.c1
-rw-r--r--arch/x86/cpu/ivybridge/cpu.c1
-rw-r--r--arch/x86/cpu/ivybridge/sdram.c1
-rw-r--r--arch/x86/cpu/mtrr.c1
-rw-r--r--arch/x86/cpu/qemu/dram.c1
-rw-r--r--arch/x86/cpu/qemu/qemu.c1
-rw-r--r--arch/x86/cpu/quark/dram.c2
-rw-r--r--arch/x86/cpu/quark/quark.c1
-rw-r--r--arch/x86/cpu/slimbootloader/sdram.c1
-rw-r--r--arch/x86/cpu/slimbootloader/slimbootloader.c1
-rw-r--r--arch/x86/cpu/tangier/tangier.c1
-rw-r--r--arch/x86/cpu/x86_64/cpu.c1
-rw-r--r--arch/x86/cpu/x86_64/interrupts.c1
-rw-r--r--arch/x86/lib/bios.c1
-rw-r--r--arch/x86/lib/fsp/fsp_common.c1
-rw-r--r--arch/x86/lib/fsp/fsp_dram.c1
-rw-r--r--arch/x86/lib/init_helpers.c1
-rw-r--r--arch/x86/lib/interrupts.c1
-rw-r--r--arch/x86/lib/spl.c2
-rw-r--r--arch/x86/lib/zimage.c1
-rw-r--r--arch/xtensa/cpu/cpu.c1
-rw-r--r--arch/xtensa/cpu/exceptions.c1
-rw-r--r--arch/xtensa/lib/bootm.c1
-rw-r--r--arch/xtensa/lib/cache.c1
-rw-r--r--arch/xtensa/lib/time.c1
245 files changed, 400 insertions, 131 deletions
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 254e0284b3f..d38c18ef8f4 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -3,6 +3,7 @@
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
*/
+#include <irq_func.h>
#include <asm/cache.h>
#include <common.h>
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 8c1cb6e8009..1340776c669 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <cpu_func.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/log2.h>
diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index 01cca95d5b1..83246550ec1 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <malloc.h>
+#include <vsprintf.h>
#include <asm/arcregs.h>
#include <asm/cache.h>
diff --git a/arch/arc/lib/interrupts.c b/arch/arc/lib/interrupts.c
index 24ff7512209..db21fbb1142 100644
--- a/arch/arc/lib/interrupts.c
+++ b/arch/arc/lib/interrupts.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/arcregs.h>
#include <asm/ptrace.h>
diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index 8aee1539a9d..177d1f40b93 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -16,6 +16,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
static void cache_flush(void);
@@ -29,7 +31,7 @@ int cleanup_before_linux (void)
* we turn off caches etc ...
*/
- disable_interrupts ();
+ disable_interrupts();
/* turn off I/D-cache */
icache_disable();
diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c
index 2ef133f1331..305713e7861 100644
--- a/arch/arm/cpu/arm920t/cpu.c
+++ b/arch/arm/cpu/arm920t/cpu.c
@@ -14,6 +14,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
static void cache_flush(void);
@@ -27,7 +29,7 @@ int cleanup_before_linux (void)
* we turn off caches etc ...
*/
- disable_interrupts ();
+ disable_interrupts();
/* turn off I/D-cache */
icache_disable();
diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c
index 49bf49bbd36..4829c996be8 100644
--- a/arch/arm/cpu/arm920t/ep93xx/timer.c
+++ b/arch/arm/cpu/arm920t/ep93xx/timer.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <time.h>
#include <linux/types.h>
#include <asm/arch/ep93xx.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c
index 96fff3f683f..17081ddb6d8 100644
--- a/arch/arm/cpu/arm920t/imx/timer.c
+++ b/arch/arm/cpu/arm920t/imx/timer.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <time.h>
#if defined (CONFIG_IMX)
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
index 4cd85114140..0c81de7e36a 100644
--- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
+++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/arch/cpu.h>
#include <asm/arch/armada100.h>
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index d2ecbd07e2f..6c6948a8ef4 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/arch/cpu.h>
#include <asm/arch/armada100.h>
diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 16eea693d12..7b7eaaf31df 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -3,6 +3,7 @@
* (C) Copyright 2011
* Ilya Yanok, EmCraft Systems
*/
+#include <cpu_func.h>
#include <linux/types.h>
#include <common.h>
diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c
index d7cffe8b690..6ab320da7d9 100644
--- a/arch/arm/cpu/arm926ejs/cpu.c
+++ b/arch/arm/cpu/arm926ejs/cpu.c
@@ -14,6 +14,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
static void cache_flush(void);
@@ -27,7 +29,7 @@ int cleanup_before_linux (void)
* we turn off caches etc ...
*/
- disable_interrupts ();
+ disable_interrupts();
/* turn off I/D-cache */
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
index 51171774741..4c59a44f7e6 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <netdev.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
index b3ca6860409..3a896d10ca5 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clk.h>
#include <asm/arch/timer.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 5fcf06ae1a8..eeb61d0d102 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <div64.h>
#include <netdev.h>
+#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch-imx/cpu.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 08b1b4de717..9bed0e91bea 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <div64.h>
#include <netdev.h>
+#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index 94b5d454e92..f51f0df8ec7 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <div64.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index cb361ac65c3..5b3b51ce15f 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <config.h>
+#include <serial.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
index 7492ba46dc7..226401dd6e2 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index d36484c9d69..ccf944f8140 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <env.h>
#include <i2c.h>
#include <net.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index e7b5bda1bc9..28c09e9fd67 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/spr_gpt.h>
diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c
index 3b4f5de8f6c..fb0ea5e817f 100644
--- a/arch/arm/cpu/arm946es/cpu.c
+++ b/arch/arm/cpu/arm946es/cpu.c
@@ -14,6 +14,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -28,7 +30,7 @@ int cleanup_before_linux (void)
* we turn off caches etc ...
*/
- disable_interrupts ();
+ disable_interrupts();
/* ARM926E-S needs the protection unit enabled for the icache to have
* been enabled - left for possible later use
diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
index 5de63053d59..2eb571050a3 100644
--- a/arch/arm/cpu/armv7/arch_timer.c
+++ b/arch/arm/cpu/armv7/arch_timer.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <div64.h>
#include <bootstage.h>
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 0dc4ebf6943..99eb7db3426 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -4,6 +4,7 @@
* Texas Instruments, <www.ti.com>
* Aneesh V <aneesh@ti.com>
*/
+#include <cpu_func.h>
#include <linux/types.h>
#include <common.h>
#include <asm/armv7.h>
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 44f27572674..68807d20997 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -16,6 +16,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
#include <asm/cache.h>
#include <asm/armv7.h>
diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c
index 274f03d8bbb..6648aed291e 100644
--- a/arch/arm/cpu/armv7/exception_level.c
+++ b/arch/arm/cpu/armv7/exception_level.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <bootm.h>
+#include <cpu_func.h>
#include <asm/armv7.h>
#include <asm/secure.h>
#include <asm/setjmp.h>
diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
index 70431ecf6b1..a5445338cb7 100644
--- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
void enable_caches(void)
diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c
index aaa767db13c..668b5e11a68 100644
--- a/arch/arm/cpu/armv7/iproc-common/timer.c
+++ b/arch/arm/cpu/armv7/iproc-common/timer.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <div64.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/iproc-common/timer.h>
#include <asm/iproc-common/sysmap.h>
diff --git a/arch/arm/cpu/armv7/kona-common/hwinit-common.c b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
index 10e74888792..6bf89e07d87 100644
--- a/arch/arm/cpu/armv7/kona-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/sizes.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index 9ccfe1042ce..664c9c1f4de 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <vsprintf.h>
#include <asm/arch/clock.h>
#include <asm/io.h>
#include <asm/arch/immap_ls102xa.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
index df64f5415a5..4a4b3c6f232 100644
--- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
+++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
@@ -6,6 +6,7 @@
*/
#include <config.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/psci.h>
#include <asm/arch/immap_ls102xa.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index e79360ada88..a5f4e31ac70 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <div64.h>
#include <asm/arch/immap_ls102xa.h>
diff --git a/arch/arm/cpu/armv7/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c
index 7adecffff87..6deecfdc238 100644
--- a/arch/arm/cpu/armv7/mpu_v7r.c
+++ b/arch/arm/cpu/armv7/mpu_v7r.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <asm/armv7.h>
#include <asm/system.h>
#include <asm/barriers.h>
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
index 0048cd8067c..e54cfb06dcb 100644
--- a/arch/arm/cpu/armv7/s5p-common/timer.c
+++ b/arch/arm/cpu/armv7/s5p-common/timer.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <div64.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/pwm.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c
index d1b763df8e3..695bdd7a5cc 100644
--- a/arch/arm/cpu/armv7/stv0991/timer.c
+++ b/arch/arm/cpu/armv7/stv0991/timer.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch-stv0991/hardware.h>
#include <asm/arch-stv0991/stv0991_cgu.h>
diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c
index 304c1ac5f9e..6bda5fbbb66 100644
--- a/arch/arm/cpu/armv7/sunxi/timer.c
+++ b/arch/arm/cpu/armv7/sunxi/timer.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/timer.h>
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 7e4641fd325..806c6adf387 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
index 821a279b630..f858de953d4 100644
--- a/arch/arm/cpu/armv7/vf610/timer.c
+++ b/arch/arm/cpu/armv7/vf610/timer.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <div64.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c
index be14eb9376f..26c93393cd7 100644
--- a/arch/arm/cpu/armv7/virt-v7.c
+++ b/arch/arm/cpu/armv7/virt-v7.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/armv7.h>
#include <asm/gic.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index 1106bead411..6dc2ca8e735 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <errno.h>
#include <asm/armv7m.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c
index 55ea0787a73..7f827da033b 100644
--- a/arch/arm/cpu/armv7m/cpu.c
+++ b/arch/arm/cpu/armv7m/cpu.c
@@ -8,6 +8,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/io.h>
#include <asm/armv7m.h>
diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c
index d04f67ae164..5c310d306d0 100644
--- a/arch/arm/cpu/armv7m/systick-timer.c
+++ b/arch/arm/cpu/armv7m/systick-timer.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index e500e722e51..c1a08fb4ace 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/system.h>
#include <asm/armv8/mmu.h>
diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c
index b312b3be356..2467e0b87be 100644
--- a/arch/arm/cpu/armv8/cpu.c
+++ b/arch/arm/cpu/armv8/cpu.c
@@ -12,6 +12,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
#include <asm/secure.h>
#include <linux/compiler.h>
diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c
index 57824eb2ac8..9c1f4a8ca8b 100644
--- a/arch/arm/cpu/armv8/exception_level.c
+++ b/arch/arm/cpu/armv8/exception_level.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <bootm.h>
+#include <cpu_func.h>
#include <asm/setjmp.h>
/**
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 83a33193211..6c87c1b11ac 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -5,8 +5,10 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <env.h>
#include <fsl_ddr_sdram.h>
+#include <vsprintf.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/system.h>
@@ -38,6 +40,7 @@
#include <fsl_validate.h>
#endif
#endif
+#include <linux/mii.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
index 6d82cfeb58e..25e9a495f7f 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/compiler.h>
#include <asm/io.h>
#include <asm/processor.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
index ede96742aad..4b047a39c07 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/compiler.h>
#include <fsl_ifc.h>
#include <asm/processor.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 7627fd13e7d..ca07c68863b 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/arch/mp.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index adfa51b6be0..70933a2e031 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fsl_immap.h>
#include <fsl_ifc.h>
+#include <init.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/arch/soc.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 3f6a5f6a428..58a39e11233 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <env.h>
#include <spl.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index c1706dcec18..46e63294fef 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <time.h>
#include <asm/system.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
index b4cb67a66a3..b5a9513eadc 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/armv8/mmu.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 8dc0ac92668..11f9b4df386 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <errno.h>
#include <linux/kernel.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c
index 5cd4a9524bc..d4dfe7f6d85 100644
--- a/arch/arm/cpu/pxa/cache.c
+++ b/arch/arm/cpu/pxa/cache.c
@@ -3,6 +3,7 @@
* (C) Copyright 2016 Vasily Khoruzhick <anarsoul@gmail.com>
*/
+#include <cpu_func.h>
#include <linux/types.h>
#include <common.h>
diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 0b28f0a3ef6..002ff7988b9 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/arch/pxa-regs.h>
#include <asm/io.h>
#include <asm/system.h>
@@ -39,13 +41,6 @@ int cleanup_before_linux(void)
return 0;
}
-void pxa_wait_ticks(int ticks)
-{
- writel(0, OSCR);
- while (readl(OSCR) < ticks)
- asm volatile("" : : : "memory");
-}
-
inline void writelrb(uint32_t val, uint32_t addr)
{
writel(val, addr);
@@ -136,8 +131,11 @@ void pxa2xx_dram_init(void)
writelrb(CONFIG_SYS_MDCNFG_VAL &
~(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3), MDCNFG);
+
/* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */
- pxa_wait_ticks(0x300);
+ writel(0, OSCR);
+ while (readl(OSCR) < 0x300)
+ asm volatile("" : : : "memory");
/*
* 8) Trigger a number (usually 8) refresh cycles by attempting
diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c
index f81ebc9ba29..91e100af1b6 100644
--- a/arch/arm/cpu/sa1100/cpu.c
+++ b/arch/arm/cpu/sa1100/cpu.c
@@ -15,6 +15,8 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -29,7 +31,7 @@ int cleanup_before_linux (void)
* just disable everything that can disturb booting linux
*/
- disable_interrupts ();
+ disable_interrupts();
/* turn off I-cache */
icache_disable();
diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 0fac5c1707f..c6b1b2c1775 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <SA-1100.h>
+#include <time.h>
static ulong get_timer_masked (void)
{
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 488358a3316..769a64257fc 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <dm.h>
#include <dm/root.h>
#include <env.h>
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 47c223917a0..f8d20960da9 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/system.h>
#include <asm/cache.h>
#include <linux/compiler.h>
@@ -253,17 +254,17 @@ static void cache_disable(uint32_t cache_bit)
#endif
#if CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
-void icache_enable (void)
+void icache_enable(void)
{
return;
}
-void icache_disable (void)
+void icache_disable(void)
{
return;
}
-int icache_status (void)
+int icache_status(void)
{
return 0; /* always off */
}
@@ -285,17 +286,17 @@ int icache_status(void)
#endif
#if CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
-void dcache_enable (void)
+void dcache_enable(void)
{
return;
}
-void dcache_disable (void)
+void dcache_disable(void)
{
return;
}
-int dcache_status (void)
+int dcache_status(void)
{
return 0; /* always off */
}
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 463d283cb76..007d4ebc491 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -7,6 +7,7 @@
/* for now: just dummy functions to satisfy the linker */
#include <common.h>
+#include <cpu_func.h>
#include <malloc.h>
/*
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index ee775ce5d26..75b70d91253 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -20,12 +20,13 @@
#include <common.h>
#include <efi_loader.h>
+#include <irq_func.h>
#include <asm/proc-armv/ptrace.h>
#include <asm/u-boot-arm.h>
DECLARE_GLOBAL_DATA_PTR;
-int interrupt_init (void)
+int interrupt_init(void)
{
/*
* setup up stacks if necessary
@@ -35,11 +36,11 @@ int interrupt_init (void)
return 0;
}
-void enable_interrupts (void)
+void enable_interrupts(void)
{
return;
}
-int disable_interrupts (void)
+int disable_interrupts(void)
{
return 0;
}
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index a32a4b68684..dffdf57aa20 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <linux/compiler.h>
#include <efi_loader.h>
diff --git a/arch/arm/lib/interrupts_m.c b/arch/arm/lib/interrupts_m.c
index 95df6cb1eb8..e4373f37810 100644
--- a/arch/arm/lib/interrupts_m.c
+++ b/arch/arm/lib/interrupts_m.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
/*
* Upon exception entry ARMv7-M processors automatically save stack
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index f3ea116e870..3c4512d495a 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
+#include <irq_func.h>
__weak void reset_misc(void)
{
diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
index 6db541a7b3b..3aef9538b4a 100644
--- a/arch/arm/mach-at91/arm920t/timer.c
+++ b/arch/arm/mach-at91/arm920t/timer.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c
index 6f5aa4274b5..e9b4e06595e 100644
--- a/arch/arm/mach-at91/arm926ejs/cpu.c
+++ b/arch/arm/mach-at91/arm926ejs/cpu.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/at91_pit.h>
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index 5da067cda10..4474a967437 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -9,6 +9,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/at91_pit.h>
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 6fb41a99b26..3b5f45b431a 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm/device.h>
#include <fdt_support.h>
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 467d0d5fbab..17855506427 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch/base.h>
#include <asm/arch/mbox.h>
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
index 99f1eabf5f8..9846463c606 100644
--- a/arch/arm/mach-davinci/timer.c
+++ b/arch/arm/mach-davinci/timer.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/timer_defs.h>
#include <div64.h>
diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index 2ae9a43b4e8..c4cf59dabbd 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c
index a6059425033..4fd2e434488 100644
--- a/arch/arm/mach-imx/cache.c
+++ b/arch/arm/mach-imx/cache.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/armv7.h>
#include <asm/pl310.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index d393a011782..d31af47c31d 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <cpu.h>
+#include <cpu_func.h>
#include <dm.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 9a203e47360..181c715be33 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c
index bbb335e275b..b3a57bcf4bc 100644
--- a/arch/arm/mach-imx/mx5/soc.c
+++ b/arch/arm/mach-imx/mx5/soc.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c
index eda168d8671..2fdf070a08b 100644
--- a/arch/arm/mach-imx/mx6/mp.c
+++ b/arch/arm/mach-imx/mx6/mp.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c
index 0c640e2e33c..4b3c59f7eef 100644
--- a/arch/arm/mach-imx/mx6/opos6ul.c
+++ b/arch/arm/mach-imx/mx6/opos6ul.c
@@ -3,6 +3,7 @@
* Copyright (C) 2018 Armadeus Systems
*/
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index 6dccee484c5..926718b49c0 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c
index c98d2e96af5..c8f6ca235b9 100644
--- a/arch/arm/mach-imx/mx7/psci-mx7.c
+++ b/arch/arm/mach-imx/mx7/psci-mx7.c
@@ -4,6 +4,7 @@
* Copyright 2017 NXP
*/
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/psci.h>
#include <asm/secure.h>
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 127fcfeea1a..4b6014e7241 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -2,6 +2,7 @@
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
*/
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index c888a939385..5a292c39643 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <div64.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c
index ed5eb1c8a77..5fe5c51f6a6 100644
--- a/arch/arm/mach-imx/timer.c
+++ b/arch/arm/mach-imx/timer.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <div64.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 3dee300d77f..375588894da 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <ns16550.h>
#include <asm/io.h>
#include <asm/arch/msmc.h>
diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
index 6ad25434386..29c0e592e42 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <netdev.h>
#include <asm/cache.h>
diff --git a/arch/arm/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c
index 1923c9e527d..5e5f3f08425 100644
--- a/arch/arm/mach-mediatek/cpu.c
+++ b/arch/arm/mach-mediatek/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <wdt.h>
#include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index d261b4ea331..d33e7f17415 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/boot.h>
#include <env.h>
#include <linux/libfdt.h>
@@ -13,6 +14,7 @@
#include <asm/armv8/mmu.h>
#include <asm/unaligned.h>
#include <efi_loader.h>
+#include <u-boot/crc.h>
#if CONFIG_IS_ENABLED(FASTBOOT)
#include <asm/psci.h>
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index aaf7b7c4472..40b98dbf08b 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <init.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
#include <pci.h>
diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c
index 959a7cff764..529dac90595 100644
--- a/arch/arm/mach-mvebu/armada8k/cpu.c
+++ b/arch/arm/mach-mvebu/armada8k/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <fdtdec.h>
#include <linux/libfdt.h>
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index f4b7a4fa801..fb241c7e4dd 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <ahci.h>
+#include <cpu_func.h>
#include <linux/mbus.h>
#include <asm/io.h>
#include <asm/pl310.h>
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index d58a0a15fff..1eff9be2705 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index b45d3ee5449..e9b3e746fea 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <stdarg.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 87b674e6948..dbb68f718d6 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -16,6 +16,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
index 79b5f4f34f4..5a693e20bb5 100644
--- a/arch/arm/mach-orion5x/cpu.c
+++ b/arch/arm/mach-orion5x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <netdev.h>
#include <asm/cache.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
index 6aaf94ae087..9da97838220 100644
--- a/arch/arm/mach-orion5x/timer.c
+++ b/arch/arm/mach-orion5x/timer.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#define UBOOT_CNTR 0 /* counter to use for uboot timer */
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 9ef94a48993..2cc701c4f5f 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -4,6 +4,7 @@
* (C) Copyright 2012 Renesas Solutions Corp.
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <env.h>
#include <linux/ctype.h>
diff --git a/arch/arm/mach-rmobile/memmap-gen3.c b/arch/arm/mach-rmobile/memmap-gen3.c
index 1a9eb72bb97..578cb9bfd3f 100644
--- a/arch/arm/mach-rmobile/memmap-gen3.c
+++ b/arch/arm/mach-rmobile/memmap-gen3.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/armv8/mmu.h>
#define GEN3_NR_REGIONS 16
diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c
index bf74955793f..9fcab446a5d 100644
--- a/arch/arm/mach-rmobile/timer.c
+++ b/arch/arm/mach-rmobile/timer.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <div64.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch-armv7/globaltimer.h>
#include <asm/arch/rmobile.h>
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 8cd8911ad3e..14b9e89ea35 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
#include <clk.h>
+#include <cpu_func.h>
#include <dm.h>
+#include <init.h>
#include <ram.h>
#include <syscon.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index bed4317f7ec..f697e937c62 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <dm/uclass-internal.h>
#include <misc.h>
+#include <u-boot/crc.h>
#include <u-boot/sha256.h>
#include <asm/arch-rockchip/misc.h>
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index ee2fb67fca6..9572f7ea9c5 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -6,6 +6,7 @@
#include <dm.h>
#include <env.h>
#include <clk.h>
+#include <init.h>
#include <asm/armv7.h>
#include <asm/io.h>
#include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index af00a6b637a..530644c0434 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <ram.h>
#include <asm/io.h>
#include <asm/arch-rockchip/sdram.h>
diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c
index 0b879b545dd..7816ba11778 100644
--- a/arch/arm/mach-s5pc1xx/cache.c
+++ b/arch/arm/mach-s5pc1xx/cache.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
void enable_caches(void)
diff --git a/arch/arm/mach-socfpga/clock_manager_gen5.c b/arch/arm/mach-socfpga/clock_manager_gen5.c
index 3a646008612..54a821a27f7 100644
--- a/arch/arm/mach-socfpga/clock_manager_gen5.c
+++ b/arch/arm/mach-socfpga/clock_manager_gen5.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <dm.h>
#include <asm/arch/clock_manager.h>
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 49dadd4c3d8..904b3d030ac 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <errno.h>
#include <fdtdec.h>
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index b820cb0673d..d36732447b6 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/pl310.h>
#include <asm/u-boot.h>
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index a46e8438f7c..ed7d9f61dcd 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clk.h>
+#include <cpu_func.h>
#include <debug_uart.h>
#include <env.h>
#include <misc.h>
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index db506367bf9..aa1d2230c98 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <mmc.h>
#include <i2c.h>
#include <serial.h>
diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c
index 239ab421a8b..520b597fcc0 100644
--- a/arch/arm/mach-sunxi/dram_helpers.c
+++ b/arch/arm/mach-sunxi/dram_helpers.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/barriers.h>
#include <asm/io.h>
#include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/p2wi.c b/arch/arm/mach-sunxi/p2wi.c
index e84e1d8d5c8..7c5c12254ea 100644
--- a/arch/arm/mach-sunxi/p2wi.c
+++ b/arch/arm/mach-sunxi/p2wi.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <errno.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/gpio.h>
diff --git a/arch/arm/mach-sunxi/rsb.c b/arch/arm/mach-sunxi/rsb.c
index 005ca58db58..01bb09b7478 100644
--- a/arch/arm/mach-sunxi/rsb.c
+++ b/arch/arm/mach-sunxi/rsb.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <errno.h>
+#include <time.h>
#include <asm/arch/cpu.h>
#include <asm/arch/gpio.h>
#include <asm/arch/prcm.h>
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index abcae15ea33..61eaba711a0 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <ns16550.h>
#include <spl.h>
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 07f54f06848..d3497a2673e 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <init.h>
#include <ns16550.h>
#include <usb.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index e539ad8b30a..31b6aa2cfc8 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -9,6 +9,7 @@
#include <div64.h>
#include <dm.h>
#include <errno.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c
index 4a889f0e342..5247e52a5aa 100644
--- a/arch/arm/mach-tegra/cmd_enterrcm.c
+++ b/arch/arm/mach-tegra/cmd_enterrcm.c
@@ -25,6 +25,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/pmc.h>
diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c
index 65b1cfc07d4..a448f2df302 100644
--- a/arch/arm/mach-tegra/ivc.c
+++ b/arch/arm/mach-tegra/ivc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch-tegra/ivc.h>
diff --git a/arch/arm/mach-uniphier/arm32/cache-uniphier.c b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
index 023b3396f55..b6e4abbad0f 100644
--- a/arch/arm/mach-uniphier/arm32/cache-uniphier.c
+++ b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <asm/armv7.h>
diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c
index ef35923f6ac..9a3793316ab 100644
--- a/arch/arm/mach-uniphier/arm32/psci.c
+++ b/arch/arm/mach-uniphier/arm32/psci.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 14b61fc7dfd..793283058c3 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <env.h>
+#include <init.h>
#include <spl.h>
#include <linux/libfdt.h>
#include <nand.h>
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index e5f557716b7..aca44dfe67c 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -4,6 +4,7 @@
* Copyright (C) 2012 Xilinx, Inc. All rights reserved.
*/
#include <common.h>
+#include <cpu_func.h>
#include <zynqpl.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index 2a71870ae7b..fbb551151ab 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index b52ac178535..6ba42bb42f6 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <debug_uart.h>
+#include <init.h>
#include <spl.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c
index 7ad023dac5a..34534d876bc 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c
index 3bbc42f508c..7cde4c6105e 100644
--- a/arch/m68k/cpu/mcf5227x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5227x/cpu_init.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf5227x/interrupts.c b/arch/m68k/cpu/mcf5227x/interrupts.c
index d38f01950b1..5a6a88cd571 100644
--- a/arch/m68k/cpu/mcf5227x/interrupts.c
+++ b/arch/m68k/cpu/mcf5227x/interrupts.c
@@ -10,6 +10,7 @@
/* CPU specific interrupt routine */
#include <common.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 79be04f7a0c..429781945bf 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <netdev.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c
index 339fbeb4292..9330042f392 100644
--- a/arch/m68k/cpu/mcf523x/cpu_init.c
+++ b/arch/m68k/cpu/mcf523x/cpu_init.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf523x/interrupts.c b/arch/m68k/cpu/mcf523x/interrupts.c
index 1d03724f15c..b554c51fcbe 100644
--- a/arch/m68k/cpu/mcf523x/interrupts.c
+++ b/arch/m68k/cpu/mcf523x/interrupts.c
@@ -7,6 +7,7 @@
/* CPU specific interrupt routine */
#include <common.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 29a17c57fce..b48a753f9b7 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index f4a38726670..dba6c236072 100644
--- a/arch/m68k/cpu/mcf52x2/cpu_init.c
+++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
@@ -18,6 +18,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/interrupts.c b/arch/m68k/cpu/mcf52x2/interrupts.c
index f874675b12f..35ed1e7901b 100644
--- a/arch/m68k/cpu/mcf52x2/interrupts.c
+++ b/arch/m68k/cpu/mcf52x2/interrupts.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <watchdog.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c
index c7ae65afce9..a76deebc68a 100644
--- a/arch/m68k/cpu/mcf530x/cpu.c
+++ b/arch/m68k/cpu/mcf530x/cpu.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c
index 27d06d92e2d..166720aef57 100644
--- a/arch/m68k/cpu/mcf530x/cpu_init.c
+++ b/arch/m68k/cpu/mcf530x/cpu_init.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf530x/interrupts.c b/arch/m68k/cpu/mcf530x/interrupts.c
index cd85c69f129..2659e3478f0 100644
--- a/arch/m68k/cpu/mcf530x/interrupts.c
+++ b/arch/m68k/cpu/mcf530x/interrupts.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index a01b5e65a74..c8a1f205305 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <netdev.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c
index cbf840f76e8..041ada0d161 100644
--- a/arch/m68k/cpu/mcf532x/cpu_init.c
+++ b/arch/m68k/cpu/mcf532x/cpu_init.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf532x/interrupts.c b/arch/m68k/cpu/mcf532x/interrupts.c
index 43a903ed72e..8f2df452bae 100644
--- a/arch/m68k/cpu/mcf532x/interrupts.c
+++ b/arch/m68k/cpu/mcf532x/interrupts.c
@@ -7,6 +7,7 @@
/* CPU specific interrupt routine */
#include <common.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index 56e5585e09e..2f79380c8be 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <netdev.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
index 134510b00f9..9c5b8122a6a 100644
--- a/arch/m68k/cpu/mcf5445x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5445x/cpu_init.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/processor.h>
diff --git a/arch/m68k/cpu/mcf5445x/interrupts.c b/arch/m68k/cpu/mcf5445x/interrupts.c
index d38f01950b1..5a6a88cd571 100644
--- a/arch/m68k/cpu/mcf5445x/interrupts.c
+++ b/arch/m68k/cpu/mcf5445x/interrupts.c
@@ -10,6 +10,7 @@
/* CPU specific interrupt routine */
#include <common.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index 819b25f280b..dc5ed1aa79f 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <netdev.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
index 81ffc6c0943..3f8c38c520d 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <MCD_dma.h>
+#include <cpu_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/interrupts.c b/arch/m68k/cpu/mcf547x_8x/interrupts.c
index 2cdf53ea09c..703090ddc25 100644
--- a/arch/m68k/cpu/mcf547x_8x/interrupts.c
+++ b/arch/m68k/cpu/mcf547x_8x/interrupts.c
@@ -7,6 +7,7 @@
/* CPU specific interrupt routine */
#include <common.h>
+#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index 544bfd20831..885659e342e 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/timer.h>
#include <asm/immap.h>
diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c
index 29f863b8b44..68f2eef584b 100644
--- a/arch/m68k/lib/cache.c
+++ b/arch/m68k/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/immap.h>
#include <asm/cache.h>
diff --git a/arch/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
index 2d1c6136a11..ddc91993a14 100644
--- a/arch/m68k/lib/interrupts.c
+++ b/arch/m68k/lib/interrupts.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <watchdog.h>
#include <asm/processor.h>
#include <asm/immap.h>
@@ -42,7 +43,7 @@ static __inline__ void set_sr (unsigned short sr)
/*
* Install and free an interrupt handler
*/
-void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
+void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg)
{
if ((vec < 0) || (vec >= NR_IRQS)) {
printf ("irq_install_handler: wrong interrupt vector %d\n",
@@ -54,7 +55,7 @@ void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
irq_vecs[vec].arg = arg;
}
-void irq_free_handler (int vec)
+void irq_free_handler(int vec)
{
if ((vec < 0) || (vec >= NR_IRQS)) {
return;
@@ -64,7 +65,7 @@ void irq_free_handler (int vec)
irq_vecs[vec].arg = NULL;
}
-void enable_interrupts (void)
+void enable_interrupts(void)
{
unsigned short sr;
@@ -72,7 +73,7 @@ void enable_interrupts (void)
set_sr (sr & ~0x0700);
}
-int disable_interrupts (void)
+int disable_interrupts(void)
{
unsigned short sr;
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index a6345a0bc9c..8957d194d4a 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
+#include <irq_func.h>
+#include <time.h>
#include <asm/timer.h>
#include <asm/immap.h>
diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c
index 5d802077453..2ccd55add0c 100644
--- a/arch/m68k/lib/traps.c
+++ b/arch/m68k/lib/traps.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <init.h>
#include <watchdog.h>
#include <command.h>
#include <asm/processor.h>
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index eebeb37830b..02f66f9087d 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -6,9 +6,10 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/asm.h>
-int dcache_status (void)
+int dcache_status(void)
{
int i = 0;
int mask = 0x80;
@@ -18,7 +19,7 @@ int dcache_status (void)
return i;
}
-int icache_status (void)
+int icache_status(void)
{
int i = 0;
int mask = 0x20;
@@ -28,28 +29,32 @@ int icache_status (void)
return i;
}
-void icache_enable (void) {
+void icache_enable(void)
+{
MSRSET(0x20);
}
-void icache_disable(void) {
+void icache_disable(void)
+{
/* we are not generate ICACHE size -> flush whole cache */
flush_cache(0, 32768);
MSRCLR(0x20);
}
-void dcache_enable (void) {
+void dcache_enable(void)
+{
MSRSET(0x80);
}
-void dcache_disable(void) {
+void dcache_disable(void)
+{
#ifdef XILINX_USE_DCACHE
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
#endif
MSRCLR(0x80);
}
-void flush_cache (ulong addr, ulong size)
+void flush_cache(ulong addr, ulong size)
{
int i;
for (i = 0; i < size; i += 4)
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index aea612eef15..910c5968848 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
#include <fdtdec.h>
+#include <irq_func.h>
#include <malloc.h>
#include <asm/microblaze_intc.h>
#include <asm/asm.h>
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index 58e5c307508..805eac7fa3f 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <time.h>
#include <asm/microblaze_timer.h>
#include <asm/microblaze_intc.h>
diff --git a/arch/microblaze/include/asm/microblaze_intc.h b/arch/microblaze/include/asm/microblaze_intc.h
index b4e0fc69305..1434be87561 100644
--- a/arch/microblaze/include/asm/microblaze_intc.h
+++ b/arch/microblaze/include/asm/microblaze_intc.h
@@ -5,6 +5,8 @@
* Michal SIMEK <monstr@monstr.cz>
*/
+#include <irq_func.h>
+
typedef volatile struct microblaze_intc_t {
int isr; /* interrupt status register */
int ipr; /* interrupt pending register */
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 01c5d57bc5b..efd5acf3592 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <env.h>
#include <fdt_support.h>
#include <image.h>
diff --git a/arch/mips/cpu/interrupts.c b/arch/mips/cpu/interrupts.c
index 1c5192ed33f..b3ba9aaeae1 100644
--- a/arch/mips/cpu/interrupts.c
+++ b/arch/mips/cpu/interrupts.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
int interrupt_init(void)
{
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index 0ddae30f2c5..502956d050c 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/cacheops.h>
#ifdef CONFIG_MIPS_L2_CACHE
#include <asm/cm.h>
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index c6a517d66f8..e68f49467c9 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -27,6 +27,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/relocs.h>
#include <asm/sections.h>
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index 976978c3e96..6fe8ebd16ba 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -11,6 +11,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <init.h>
#include <asm/mipsregs.h>
#include <asm/addrspace.h>
#include <asm/system.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c
index dbd328cb49f..0ae5e09e019 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -8,6 +8,8 @@
#include <config.h>
#include <common.h>
+#include <cpu_func.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/sections.h>
#include <mach/jz4780.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c
index a689b9d71ac..b32a2f56438 100644
--- a/arch/mips/mach-jz47xx/jz4780/timer.c
+++ b/arch/mips/mach-jz47xx/jz4780/timer.c
@@ -9,6 +9,8 @@
#include <config.h>
#include <common.h>
#include <div64.h>
+#include <irq_func.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/mipsregs.h>
#include <mach/jz4780.h>
diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c
index 75763c45286..3cd440804d0 100644
--- a/arch/mips/mach-mtmips/ddr_calibrate.c
+++ b/arch/mips/mach-mtmips/ddr_calibrate.c
@@ -17,6 +17,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/io.h>
#include <asm/cacheops.h>
#include <asm/io.h>
diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c
index c5a7a3fd0a4..0660fffa45f 100644
--- a/arch/nds32/cpu/n1213/ae3xx/cpu.c
+++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c
@@ -15,6 +15,8 @@
/* CPU specific code */
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <watchdog.h>
#include <asm/cache.h>
diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c
index c9cb4333bae..3ae87a21bb9 100644
--- a/arch/nds32/cpu/n1213/ag101/cpu.c
+++ b/arch/nds32/cpu/n1213/ag101/cpu.c
@@ -15,6 +15,8 @@
/* CPU specific code */
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <watchdog.h>
#include <asm/cache.h>
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index dfec5b3e96b..f2e362102e6 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -9,6 +9,8 @@
*/
#ifndef CONFIG_TIMER
#include <common.h>
+#include <irq_func.h>
+#include <time.h>
#include <asm/io.h>
#include <faraday/fttmr010.h>
diff --git a/arch/nds32/lib/cache.c b/arch/nds32/lib/cache.c
index 27065136dd2..e11d300b6db 100644
--- a/arch/nds32/lib/cache.c
+++ b/arch/nds32/lib/cache.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
static inline unsigned long CACHE_SET(unsigned char cache)
{
diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c
index 966c19a1ae5..88cc7b98d85 100644
--- a/arch/nds32/lib/interrupts.c
+++ b/arch/nds32/lib/interrupts.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#undef INTERRUPT_MODE
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 1fc79213e20..37ffa8f4a43 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -6,8 +6,10 @@
#include <common.h>
#include <cpu.h>
+#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <irq_func.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c
index 6b5d0724e34..e9d1ff911be 100644
--- a/arch/nios2/cpu/interrupts.c
+++ b/arch/nios2/cpu/interrupts.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <command.h>
+#include <irq_func.h>
#include <asm/nios2.h>
#include <asm/types.h>
#include <asm/io.h>
@@ -23,7 +24,7 @@ struct irq_action {
static struct irq_action vecs[32];
-int disable_interrupts (void)
+int disable_interrupts(void)
{
int val = rdctl (CTL_STATUS);
wrctl (CTL_STATUS, val & ~STATUS_IE);
@@ -36,7 +37,7 @@ void enable_interrupts( void )
wrctl (CTL_STATUS, val | STATUS_IE);
}
-void external_interrupt (struct pt_regs *regs)
+void external_interrupt(struct pt_regs *regs)
{
unsigned irqs;
struct irq_action *act;
@@ -73,7 +74,7 @@ static void def_hdlr (void *arg)
}
/*************************************************************************/
-void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
+void irq_install_handler(int irq, interrupt_handler_t *hdlr, void *arg)
{
int flag;
@@ -84,7 +85,7 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
return;
act = &vecs[irq];
- flag = disable_interrupts ();
+ flag = disable_interrupts();
if (hdlr) {
act->handler = hdlr;
act->arg = arg;
@@ -95,11 +96,11 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
ena &= ~(1 << irq); /* disable */
}
wrctl (CTL_IENABLE, ena);
- if (flag) enable_interrupts ();
+ if (flag) enable_interrupts();
}
-int interrupt_init (void)
+int interrupt_init(void)
{
int i;
@@ -110,7 +111,7 @@ int interrupt_init (void)
vecs[i].count = 0;
}
- enable_interrupts ();
+ enable_interrupts();
return (0);
}
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 485d5ae540c..e1891617c76 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
diff --git a/arch/nios2/lib/cache.c b/arch/nios2/lib/cache.c
index c2cdee3e9e6..0b961ac6762 100644
--- a/arch/nios2/lib/cache.c
+++ b/arch/nios2/lib/cache.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 3048ecf34ad..c3e25978a80 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -10,6 +10,9 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <irq_func.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <mpc83xx.h>
@@ -194,7 +197,7 @@ void watchdog_reset (void)
immr->wdt.swsrr = 0xaa39;
if (re_enable)
- enable_interrupts ();
+ enable_interrupts();
}
#endif
diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c
index 10e9b96add1..a6eb7cb97cb 100644
--- a/arch/powerpc/cpu/mpc83xx/ecc.c
+++ b/arch/powerpc/cpu/mpc83xx/ecc.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <mpc83xx.h>
#include <command.h>
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index 520c2c363e3..e83895deabb 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
+#include <irq_func.h>
#include <mpc83xx.h>
#include <asm/processor.h>
@@ -35,7 +36,7 @@ void interrupt_init_cpu (unsigned *decrementer_count)
* Handle external interrupts
*/
-void external_interrupt (struct pt_regs *regs)
+void external_interrupt(struct pt_regs *regs)
{
}
@@ -45,12 +46,12 @@ void external_interrupt (struct pt_regs *regs)
*/
void
-irq_install_handler (int irq, interrupt_handler_t * handler, void *arg)
+irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
{
}
-void irq_free_handler (int irq)
+void irq_free_handler(int irq)
{
}
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index 8b5ecdb9ad1..a14a438b02d 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -13,6 +13,8 @@
#ifndef CONFIG_MPC83XX_SDRAM
#include <common.h>
+#include <cpu_func.h>
+#include <vsprintf.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <i2c.h>
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index e118a10fa8b..93af7f495fd 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <mpc83xx.h>
#include <command.h>
+#include <vsprintf.h>
#include <asm/processor.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index bf48836036b..18556629c3d 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -10,6 +10,9 @@
#include <config.h>
#include <common.h>
+#include <cpu_func.h>
+#include <irq_func.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <fsl_esdhc.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 13691f38366..a9f39dc5838 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <env.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/processor.h>
#include <ioports.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index fcfa7302334..ebdcd29c13d 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <env.h>
+#include <time.h>
#ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
#include <hwconfig.h>
#endif
diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
index b5a6ead8bde..e767573193f 100644
--- a/arch/powerpc/cpu/mpc85xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc85xx/interrupts.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <watchdog.h>
#include <command.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 3882c95f92e..9757bffe025 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <env.h>
#include <asm/processor.h>
#include <env.h>
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index acc2f2bb818..15b05fcc513 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <ppc_asm.tmpl>
#include <linux/compiler.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index e1d492f05a9..804788d0507 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <command.h>
+#include <irq_func.h>
#include <kgdb.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index c023d0684f8..bb14444a2e7 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -6,6 +6,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <asm/cache.h>
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index ed780a599d1..0f930fcd9e1 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -15,6 +15,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <mpc86xx.h>
#include <command.h>
#include <asm/processor.h>
@@ -108,5 +109,5 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
*/
void external_interrupt(struct pt_regs *regs)
{
- puts("external_interrupt (oops!)\n");
+ puts("external_interrupt(oops!)\n");
}
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index ce300eac5b0..07c4c079df3 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <ioports.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cache.c b/arch/powerpc/cpu/mpc8xx/cache.c
index 8051d3e8d23..41559009cac 100644
--- a/arch/powerpc/cpu/mpc8xx/cache.c
+++ b/arch/powerpc/cpu/mpc8xx/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/processor.h>
#include <asm/ppc.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 798eabdc21c..0604433e726 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -17,6 +17,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
+#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <mpc8xx.h>
@@ -33,70 +35,6 @@
DECLARE_GLOBAL_DATA_PTR;
-static int check_CPU(long clock, uint pvr, uint immr)
-{
- immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
- uint k;
- char buf[32];
-
- /* the highest 16 bits should be 0x0050 for a 860 */
-
- if (PVR_VER(pvr) != PVR_VER(PVR_8xx))
- return -1;
-
- k = (immr << 16) |
- in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]);
-
- /*
- * Some boards use sockets so different CPUs can be used.
- * We have to check chip version in run time.
- */
- switch (k) {
- /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */
- case 0x08010004: /* Rev. A.0 */
- printf("MPC866xxxZPnnA");
- break;
- case 0x08000003: /* Rev. 0.3 */
- printf("MPC866xxxZPnn");
- break;
- case 0x09000000: /* 870/875/880/885 */
- puts("MPC885ZPnn");
- break;
-
- default:
- printf("unknown MPC86x (0x%08x)", k);
- break;
- }
-
- printf(" at %s MHz: ", strmhz(buf, clock));
-
- print_size(checkicache(), " I-Cache ");
- print_size(checkdcache(), " D-Cache");
-
- /* do we have a FEC (860T/P or 852/859/866/885)? */
-
- out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678);
- if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678)
- printf(" FEC present");
-
- putc('\n');
-
- return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-
-int checkcpu(void)
-{
- ulong clock = gd->cpu_clk;
- uint immr = get_immr(); /* Return full IMMR contents */
- uint pvr = get_pvr();
-
- puts("CPU: ");
-
- return check_CPU(clock, pvr, immr);
-}
-
/* ------------------------------------------------------------------------- */
/* L1 i-cache */
@@ -141,7 +79,7 @@ int checkicache(void)
/* L1 d-cache */
/* call with cache disabled */
-int checkdcache(void)
+static int checkdcache(void)
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -173,6 +111,70 @@ int checkdcache(void)
return lines << 4;
};
+static int check_CPU(long clock, uint pvr, uint immr)
+{
+ immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
+ uint k;
+ char buf[32];
+
+ /* the highest 16 bits should be 0x0050 for a 860 */
+
+ if (PVR_VER(pvr) != PVR_VER(PVR_8xx))
+ return -1;
+
+ k = (immr << 16) |
+ in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]);
+
+ /*
+ * Some boards use sockets so different CPUs can be used.
+ * We have to check chip version in run time.
+ */
+ switch (k) {
+ /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */
+ case 0x08010004: /* Rev. A.0 */
+ printf("MPC866xxxZPnnA");
+ break;
+ case 0x08000003: /* Rev. 0.3 */
+ printf("MPC866xxxZPnn");
+ break;
+ case 0x09000000: /* 870/875/880/885 */
+ puts("MPC885ZPnn");
+ break;
+
+ default:
+ printf("unknown MPC86x (0x%08x)", k);
+ break;
+ }
+
+ printf(" at %s MHz: ", strmhz(buf, clock));
+
+ print_size(checkicache(), " I-Cache ");
+ print_size(checkdcache(), " D-Cache");
+
+ /* do we have a FEC (860T/P or 852/859/866/885)? */
+
+ out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678);
+ if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678)
+ printf(" FEC present");
+
+ putc('\n');
+
+ return 0;
+}
+
+/* ------------------------------------------------------------------------- */
+
+int checkcpu(void)
+{
+ ulong clock = gd->cpu_clk;
+ uint immr = get_immr(); /* Return full IMMR contents */
+ uint pvr = get_pvr();
+
+ puts("CPU: ");
+
+ return check_CPU(clock, pvr, immr);
+}
+
/* ------------------------------------------------------------------------- */
void upmconfig(uint upm, uint *table, uint size)
diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c
index 26aa7a56455..6ee6088fa8a 100644
--- a/arch/powerpc/cpu/mpc8xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc8xx/interrupts.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <mpc8xx.h>
#include <mpc8xx_irq.h>
#include <asm/cpm_8xx.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index 467eac4a2e2..ed482a9c098 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -10,6 +10,7 @@
#include <config.h>
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <tsec.h>
#include <fm_eth.h>
#include <netdev.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 0d877c43be8..485c2d4feb0 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/mp.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c
index ea7dac6e668..a1f94035596 100644
--- a/arch/powerpc/cpu/mpc8xxx/srio.c
+++ b/arch/powerpc/cpu/mpc8xxx/srio.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <config.h>
+#include <time.h>
#include <asm/fsl_law.h>
#include <asm/fsl_serdes.h>
#include <asm/fsl_srio.h>
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 84691b75546..f2e670eb6bf 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -8,6 +8,7 @@
#include <common.h>
+#include <cpu_func.h>
#include <env.h>
#include <watchdog.h>
#include <command.h>
diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c
index 2d36c3aa082..3c3c470bbbd 100644
--- a/arch/powerpc/lib/cache.c
+++ b/arch/powerpc/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/cache.h>
#include <watchdog.h>
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index 19682cfcfad..64ee0cc2102 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/processor.h>
#include <watchdog.h>
#ifdef CONFIG_LED_STATUS
@@ -15,15 +16,6 @@
#endif
#ifndef CONFIG_MPC83XX_TIMER
-#ifdef CONFIG_SHOW_ACTIVITY
-void board_show_activity (ulong) __attribute__((weak, alias("__board_show_activity")));
-
-void __board_show_activity (ulong dummy)
-{
- return;
-}
-#endif /* CONFIG_SHOW_ACTIVITY */
-
#ifndef CONFIG_SYS_WATCHDOG_FREQ
#define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2)
#endif
@@ -47,13 +39,13 @@ static __inline__ void set_dec (unsigned long val)
}
#endif /* !CONFIG_MPC83XX_TIMER */
-void enable_interrupts (void)
+void enable_interrupts(void)
{
set_msr (get_msr () | MSR_EE);
}
/* returns flag if MSR_EE was set before */
-int disable_interrupts (void)
+int disable_interrupts(void)
{
ulong msr = get_msr ();
@@ -62,7 +54,7 @@ int disable_interrupts (void)
}
#ifndef CONFIG_MPC83XX_TIMER
-int interrupt_init (void)
+int interrupt_init(void)
{
/* call cpu specific function from $(CPU)/interrupts.c */
interrupt_init_cpu (&decrementer_count);
@@ -76,7 +68,7 @@ int interrupt_init (void)
static volatile ulong timestamp = 0;
-void timer_interrupt (struct pt_regs *regs)
+void timer_interrupt(struct pt_regs *regs)
{
/* call cpu specific function from $(CPU)/interrupts.c */
timer_interrupt_cpu (regs);
@@ -92,12 +84,8 @@ void timer_interrupt (struct pt_regs *regs)
#endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
#ifdef CONFIG_LED_STATUS
- status_led_tick (timestamp);
+ status_led_tick(timestamp);
#endif /* CONFIG_LED_STATUS */
-
-#ifdef CONFIG_SHOW_ACTIVITY
- board_show_activity (timestamp);
-#endif /* CONFIG_SHOW_ACTIVITY */
}
ulong get_timer (ulong base)
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index a22a73abfa5..e1494fa1292 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
/* ------------------------------------------------------------------------- */
diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c
index 41de30cc024..1455f2298f7 100644
--- a/arch/riscv/cpu/ax25/cache.c
+++ b/arch/riscv/cpu/ax25/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <dm/uclass-internal.h>
#include <cache.h>
diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c
index 76689b21d3d..f092600e14d 100644
--- a/arch/riscv/cpu/ax25/cpu.c
+++ b/arch/riscv/cpu/ax25/cpu.c
@@ -6,6 +6,8 @@
/* CPU specific code */
#include <common.h>
+#include <cpu_func.h>
+#include <irq_func.h>
#include <asm/cache.h>
/*
diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c
index ad2950ce40a..c0a5288bdbb 100644
--- a/arch/riscv/cpu/generic/cpu.c
+++ b/arch/riscv/cpu/generic/cpu.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <irq_func.h>
/*
* cleanup_before_linux() is called just before we call linux
diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c
index b7b12072351..1dc77efeca5 100644
--- a/arch/riscv/cpu/generic/dram.c
+++ b/arch/riscv/cpu/generic/dram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c
index 5437a122a10..b1d42bcc2bb 100644
--- a/arch/riscv/lib/cache.c
+++ b/arch/riscv/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
void invalidate_icache_all(void)
{
diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index 74c1e561c71..3b25c5b7a75 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/encoding.h>
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index cc66f15567a..705437862a0 100644
--- a/arch/riscv/lib/smp.c
+++ b/arch/riscv/lib/smp.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <asm/barrier.h>
#include <asm/smp.h>
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index bea86959872..a544df0a2b1 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -4,6 +4,7 @@
* Lukas Auer <lukas.auer@aisec.fraunhofer.de>
*/
#include <common.h>
+#include <cpu_func.h>
#include <spl.h>
#include <asm/smp.h>
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index f3af88d79e9..ff7430393ff 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
#include <linux/libfdt.h>
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index cfc542c8066..fff9cbdd79d 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <errno.h>
#include <os.h>
#include <cli.h>
diff --git a/arch/sandbox/lib/interrupts.c b/arch/sandbox/lib/interrupts.c
index 4ddcd37522d..21f761ac3b0 100644
--- a/arch/sandbox/lib/interrupts.c
+++ b/arch/sandbox/lib/interrupts.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <irq_func.h>
int interrupt_init(void)
{
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index 50490904249..2f49ce86816 100644
--- a/arch/sh/cpu/sh4/cache.c
+++ b/arch/sh/cpu/sh4/cache.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/system.h>
diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c
index a8b50a9ff5c..f1b8df9b0b2 100644
--- a/arch/sh/cpu/sh4/cpu.c
+++ b/arch/sh/cpu/sh4/cpu.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <command.h>
+#include <irq_func.h>
+#include <cpu_func.h>
#include <netdev.h>
#include <asm/processor.h>
diff --git a/arch/sh/cpu/sh4/interrupts.c b/arch/sh/cpu/sh4/interrupts.c
index ff7470ecccb..278a3e32ac9 100644
--- a/arch/sh/cpu/sh4/interrupts.c
+++ b/arch/sh/cpu/sh4/interrupts.c
@@ -5,17 +5,18 @@
*/
#include <common.h>
+#include <irq_func.h>
-int interrupt_init (void)
+int interrupt_init(void)
{
return 0;
}
-void enable_interrupts (void)
+void enable_interrupts(void)
{
}
-int disable_interrupts (void){
+int disable_interrupts(void){
return 0;
}
diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
index 14bef6b45bc..d82c1d2feb3 100644
--- a/arch/sh/lib/time_sh2.c
+++ b/arch/sh/lib/time_sh2.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/io.h>
#include <asm/processor.h>
diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c
index 93933b7931d..602776a4742 100644
--- a/arch/sh/lib/zimageboot.c
+++ b/arch/sh/lib/zimageboot.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/io.h>
#include <asm/zimage.h>
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index c3d4a8d5477..2aa6f245e7d 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <bloblist.h>
+#include <cpu_func.h>
#include <debug_uart.h>
#include <handoff.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index b31d78c092a..dfd8afc35f5 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <pci.h>
#include <syscon.h>
#include <asm/cpu.h>
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 9686f8ed5b4..0c4c6348d1d 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <fdtdec.h>
#include <usb.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index 664817feffd..27e859885e8 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/e820.h>
#include <asm/arch/sysinfo.h>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 9ee4b0294ae..4e59476fc99 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <acpi_s3.h>
#include <command.h>
+#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
#include <malloc.h>
diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c
index ba7c02bd7e8..13077411dc0 100644
--- a/arch/x86/cpu/efi/app.c
+++ b/arch/x86/cpu/efi/app.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <fdtdec.h>
#include <netdev.h>
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 225aef7bf6a..66df1287871 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -5,8 +5,10 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <efi.h>
#include <errno.h>
+#include <init.h>
#include <usb.h>
#include <asm/bootparam.h>
#include <asm/e820.h>
diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c
index a45525f842e..3143c079adb 100644
--- a/arch/x86/cpu/efi/sdram.c
+++ b/arch/x86/cpu/efi/sdram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <efi.h>
+#include <init.h>
#include <asm/u-boot-x86.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 31663714a09..c66382bdd2f 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -19,6 +19,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <malloc.h>
#include <asm/control_regs.h>
#include <asm/cpu.h>
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index 1445204878c..78aa51a3ea6 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <dm.h>
#include <efi_loader.h>
+#include <irq_func.h>
#include <asm/control_regs.h>
#include <asm/i8259.h>
#include <asm/interrupt.h>
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index b35102a3f08..755670a847e 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <syscon.h>
#include <asm/cpu.h>
#include <asm/gpio.h>
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index 6db9da81b71..8f30cdbe247 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index 8a58d0383d5..51ca4ad3017 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
#include <malloc.h>
#include <net.h>
#include <rtc.h>
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index a00db422e7a..a43cb7fc154 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -17,6 +17,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c
index 6707b7b3634..19d92f27d80 100644
--- a/arch/x86/cpu/qemu/dram.c
+++ b/arch/x86/cpu/qemu/dram.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/post.h>
#include <asm/arch/qemu.h>
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 5e8b4f068e1..716351ad7ff 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <pci.h>
#include <qfw.h>
#include <asm/irq.h>
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 51f9659ab15..995e119fb6f 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -4,8 +4,10 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
#include <malloc.h>
#include <asm/mrccache.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index d39edb2271b..d6611eea5dc 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <mmc.h>
#include <asm/io.h>
#include <asm/ioapic.h>
diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c
index 05d40d196ce..33e91fb6366 100644
--- a/arch/x86/cpu/slimbootloader/sdram.c
+++ b/arch/x86/cpu/slimbootloader/sdram.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <linux/sizes.h>
#include <asm/e820.h>
#include <asm/arch/slimbootloader.h>
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index e6b174ca886..21dcfb2142e 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/arch/slimbootloader.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c
index df2c600be33..43bee1fb704 100644
--- a/arch/x86/cpu/tangier/tangier.c
+++ b/arch/x86/cpu/tangier/tangier.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/u-boot-x86.h>
/*
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index 42abb23a9ed..90925e46ea2 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <debug_uart.h>
/*
diff --git a/arch/x86/cpu/x86_64/interrupts.c b/arch/x86/cpu/x86_64/interrupts.c
index 15830d6a1a0..634f7660c03 100644
--- a/arch/x86/cpu/x86_64/interrupts.c
+++ b/arch/x86/cpu/x86_64/interrupts.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/processor-flags.h>
void enable_interrupts(void)
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index b990f53bfd7..30c0997fd01 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
#include <bios_emul.h>
+#include <irq_func.h>
#include <vbe.h>
#include <linux/linkage.h>
#include <asm/cache.h>
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 40ba866d77c..a5efe35f593 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <acpi_s3.h>
+#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
#include <rtc.h>
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 2d1023068fe..bc456bb4a9e 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <handoff.h>
+#include <init.h>
#include <asm/fsp/fsp_support.h>
#include <asm/e820.h>
#include <asm/mrccache.h>
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index 3e3a11ac2fa..5bb55e256fb 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <linux/errno.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index 39f8deaed13..b23b8fd4021 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -30,6 +30,7 @@
*/
#include <common.h>
+#include <irq_func.h>
#include <asm/interrupt.h>
#if !CONFIG_IS_ENABLED(X86_64)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 1677f80b25c..f0e2bf053d7 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -4,8 +4,10 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <debug_uart.h>
#include <dm.h>
+#include <irq_func.h>
#include <malloc.h>
#include <spl.h>
#include <syscon.h>
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index d07041fd4ce..9b5e767ccc2 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <env.h>
+#include <irq_func.h>
#include <malloc.h>
#include <asm/acpi_table.h>
#include <asm/io.h>
diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c
index 64bb0b6ee0b..6f4b88f88e1 100644
--- a/arch/xtensa/cpu/cpu.c
+++ b/arch/xtensa/cpu/cpu.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
+#include <vsprintf.h>
#include <linux/stringify.h>
#include <asm/global_data.h>
#include <asm/cache.h>
diff --git a/arch/xtensa/cpu/exceptions.c b/arch/xtensa/cpu/exceptions.c
index fe2dedf3c4b..3b8f4a36d3e 100644
--- a/arch/xtensa/cpu/exceptions.c
+++ b/arch/xtensa/cpu/exceptions.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <command.h>
+#include <irq_func.h>
#include <asm/string.h>
#include <asm/regs.h>
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 93eea53c5f2..057b229433e 100644
--- a/arch/xtensa/lib/bootm.c
+++ b/arch/xtensa/lib/bootm.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_func.h>
#include <env.h>
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
diff --git a/arch/xtensa/lib/cache.c b/arch/xtensa/lib/cache.c
index 8f13f1fb630..4e0c0acc3bb 100644
--- a/arch/xtensa/lib/cache.c
+++ b/arch/xtensa/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/cache.h>
/*
diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
index 81459b4c287..62bbe37b806 100644
--- a/arch/xtensa/lib/time.c
+++ b/arch/xtensa/lib/time.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <time.h>
#include <asm/global_data.h>
#include <linux/stringify.h>