[U-Boot] [PATCH 28/41] common: Move some cache and MMU functions out of common.h
Simon Glass
sjg at chromium.org
Mon Sep 30 14:40:59 UTC 2019
These functions belong in cpu_legacy.h. Another option would be cache.h
but that code uses driver model and we have not moved these cache
functions to use driver model. Since they are CPU-related it seems
reasonable to put them here.
Move them over.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arc/lib/cache.c | 1 +
arch/arm/cpu/arm11/cpu.c | 1 +
arch/arm/cpu/arm920t/cpu.c | 1 +
arch/arm/cpu/arm926ejs/armada100/cpu.c | 1 +
arch/arm/cpu/arm926ejs/cache.c | 1 +
arch/arm/cpu/arm926ejs/cpu.c | 1 +
arch/arm/cpu/arm926ejs/spear/spr_misc.c | 1 +
arch/arm/cpu/arm946es/cpu.c | 1 +
arch/arm/cpu/armv7/cpu.c | 1 +
arch/arm/cpu/armv7/exception_level.c | 1 +
arch/arm/cpu/armv7/iproc-common/hwinit-common.c | 1 +
arch/arm/cpu/armv7/kona-common/hwinit-common.c | 1 +
arch/arm/cpu/armv7/mpu_v7r.c | 1 +
arch/arm/cpu/armv7/vf610/generic.c | 1 +
arch/arm/cpu/armv7m/cache.c | 1 +
arch/arm/cpu/armv7m/cpu.c | 1 +
arch/arm/cpu/armv8/cache_v8.c | 1 +
arch/arm/cpu/armv8/cpu.c | 1 +
arch/arm/cpu/armv8/exception_level.c | 1 +
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 1 +
arch/arm/cpu/pxa/pxa2xx.c | 1 +
arch/arm/cpu/sa1100/cpu.c | 1 +
arch/arm/lib/cache-cp15.c | 1 +
arch/arm/mach-at91/armv7/cpu.c | 1 +
arch/arm/mach-bcm283x/init.c | 1 +
arch/arm/mach-exynos/soc.c | 1 +
arch/arm/mach-imx/cache.c | 1 +
arch/arm/mach-imx/imx8/cpu.c | 1 +
arch/arm/mach-imx/mx5/soc.c | 1 +
arch/arm/mach-keystone/init.c | 1 +
arch/arm/mach-mediatek/cpu.c | 1 +
arch/arm/mach-mvebu/armada8k/cpu.c | 1 +
arch/arm/mach-mvebu/cpu.c | 1 +
arch/arm/mach-omap2/omap-cache.c | 1 +
arch/arm/mach-orion5x/cpu.c | 1 +
arch/arm/mach-rmobile/cpu_info.c | 1 +
arch/arm/mach-rmobile/memmap-gen3.c | 1 +
arch/arm/mach-rockchip/board.c | 1 +
arch/arm/mach-s5pc1xx/cache.c | 1 +
arch/arm/mach-socfpga/misc.c | 1 +
arch/arm/mach-socfpga/spl_a10.c | 1 +
arch/arm/mach-stm32mp/cpu.c | 1 +
arch/arm/mach-sunxi/board.c | 1 +
arch/arm/mach-tegra/board.c | 1 +
arch/arm/mach-uniphier/arm32/cache-uniphier.c | 1 +
arch/arm/mach-zynq/cpu.c | 1 +
arch/m68k/cpu/mcf5227x/cpu_init.c | 1 +
arch/m68k/cpu/mcf523x/cpu_init.c | 1 +
arch/m68k/cpu/mcf52x2/cpu_init.c | 1 +
arch/m68k/cpu/mcf530x/cpu_init.c | 1 +
arch/m68k/cpu/mcf532x/cpu_init.c | 1 +
arch/m68k/cpu/mcf5445x/cpu_init.c | 1 +
arch/m68k/cpu/mcf547x_8x/cpu_init.c | 1 +
arch/m68k/lib/cache.c | 1 +
arch/microblaze/cpu/cache.c | 1 +
arch/mips/lib/cache.c | 1 +
arch/nds32/cpu/n1213/ae3xx/cpu.c | 1 +
arch/nds32/cpu/n1213/ag101/cpu.c | 1 +
arch/nds32/lib/cache.c | 1 +
arch/nios2/lib/cache.c | 1 +
arch/powerpc/cpu/mpc83xx/spd_sdram.c | 1 +
arch/powerpc/cpu/mpc8xx/cache.c | 1 +
arch/riscv/cpu/ax25/cache.c | 1 +
arch/riscv/cpu/ax25/cpu.c | 1 +
arch/riscv/lib/cache.c | 1 +
arch/sh/cpu/sh4/cache.c | 1 +
arch/x86/cpu/cpu.c | 1 +
arch/x86/cpu/i386/cpu.c | 1 +
arch/x86/cpu/mtrr.c | 1 +
arch/x86/cpu/x86_64/cpu.c | 1 +
arch/x86/lib/spl.c | 1 +
arch/xtensa/lib/cache.c | 1 +
board/armltd/integrator/integrator.c | 1 +
board/cirrus/edb93xx/edb93xx.c | 1 +
board/cobra5272/flash.c | 1 +
board/h2200/h2200.c | 1 +
board/highbank/highbank.c | 1 +
board/st/stih410-b2260/board.c | 1 +
board/synopsys/hsdk/hsdk.c | 1 +
board/syteco/zmx25/zmx25.c | 1 +
board/toradex/colibri_pxa270/colibri_pxa270.c | 1 +
board/xilinx/zynqmp/cmds.c | 1 +
cmd/cache.c | 1 +
cmd/ti/ddr3.c | 1 +
common/bootm_os.c | 1 +
common/kgdb_stubs.c | 1 +
common/spl/spl_atf.c | 1 +
drivers/ddr/altera/sdram_arria10.c | 1 +
drivers/ddr/altera/sdram_s10.c | 1 +
drivers/fpga/zynqpl.c | 1 +
drivers/video/cfb_console.c | 1 +
include/common.h | 10 +---------
include/cpu_legacy.h | 8 ++++++++
post/cpu/mpc83xx/ecc.c | 1 +
post/lib_powerpc/cpu.c | 1 +
95 files changed, 102 insertions(+), 9 deletions(-)
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 8c1cb6e8009..6172b8b9025 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_legacy.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/log2.h>
diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index 8aee1539a9d..a546ec21de4 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <asm/system.h>
static void cache_flush(void);
diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c
index 2ef133f1331..a98c86eaf3f 100644
--- a/arch/arm/cpu/arm920t/cpu.c
+++ b/arch/arm/cpu/arm920t/cpu.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <asm/system.h>
static void cache_flush(void);
diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
index 4cd85114140..b7926e40b11 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_legacy.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..6ae8e8b380a 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_legacy.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..6d06fb758ab 100644
--- a/arch/arm/cpu/arm926ejs/cpu.c
+++ b/arch/arm/cpu/arm926ejs/cpu.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <asm/system.h>
static void cache_flush(void);
diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index d36484c9d69..47c7c5b6e9a 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_legacy.h>
#include <env.h>
#include <i2c.h>
#include <net.h>
diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c
index 3b4f5de8f6c..0a78ffbae1a 100644
--- a/arch/arm/cpu/arm946es/cpu.c
+++ b/arch/arm/cpu/arm946es/cpu.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <asm/system.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 44f27572674..bf3ebba0523 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.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..9d7dcb1681d 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_legacy.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..70ba24072a3 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_legacy.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
void enable_caches(void)
diff --git a/arch/arm/cpu/armv7/kona-common/hwinit-common.c b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
index 10e74888792..07e7b1fea19 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_legacy.h>
#include <linux/sizes.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
diff --git a/arch/arm/cpu/armv7/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c
index 7adecffff87..c1a0079900a 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_legacy.h>
#include <asm/armv7.h>
#include <asm/system.h>
#include <asm/barriers.h>
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 7e4641fd325..9307c343b0c 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_legacy.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index 1106bead411..b2915661522 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.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..fed17bd6490 100644
--- a/arch/arm/cpu/armv7m/cpu.c
+++ b/arch/arm/cpu/armv7m/cpu.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/io.h>
#include <asm/armv7m.h>
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index e500e722e51..f92dd4daaf0 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_legacy.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..6fdc94ec081 100644
--- a/arch/arm/cpu/armv8/cpu.c
+++ b/arch/arm/cpu/armv8/cpu.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.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..1407d1b9cad 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_legacy.h>
#include <asm/setjmp.h>
/**
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 8eeeef199b1..9acb4548546 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_legacy.h>
#include <env.h>
#include <spl.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 43c206b2459..aad4b52e7b2 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <time.h>
#include <asm/arch/pxa-regs.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c
index f81ebc9ba29..8ef9f294f23 100644
--- a/arch/arm/cpu/sa1100/cpu.c
+++ b/arch/arm/cpu/sa1100/cpu.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <asm/system.h>
#include <asm/io.h>
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index fc6d69134ce..7b002f14f56 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/system.h>
#include <asm/cache.h>
#include <linux/compiler.h>
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index 638645c7e40..f301fae89bf 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 97414415a6c..1ca1c4f99b4 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
int arch_cpu_init(void)
{
diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index 2ae9a43b4e8..b718f6fff6f 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.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..65a9a7ede46 100644
--- a/arch/arm/mach-imx/cache.c
+++ b/arch/arm/mach-imx/cache.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_legacy.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 f2fa262ac89..91995696d78 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_legacy.h>
#include <dm.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c
index bbb335e275b..35b5a372708 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_legacy.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 3dee300d77f..f53920f1dd4 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <ns16550.h>
#include <asm/io.h>
#include <asm/arch/msmc.h>
diff --git a/arch/arm/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c
index 1923c9e527d..7f9996163d0 100644
--- a/arch/arm/mach-mediatek/cpu.c
+++ b/arch/arm/mach-mediatek/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <wdt.h>
#include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c
index 959a7cff764..e0b8b6568b2 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_legacy.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..4a5c8f959ab 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_legacy.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..27029f59b6f 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_legacy.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
index 79b5f4f34f4..364f1ec9869 100644
--- a/arch/arm/mach-orion5x/cpu.c
+++ b/arch/arm/mach-orion5x/cpu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <netdev.h>
#include <asm/cache.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 9ef94a48993..7a6a790b554 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_legacy.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..f69c68f57af 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_legacy.h>
#include <asm/armv8/mmu.h>
#define GEN3_NR_REGIONS 16
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 8ca34637315..d1cff2424c3 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clk.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <ram.h>
#include <syscon.h>
diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c
index 0b879b545dd..c686ff0a2cf 100644
--- a/arch/arm/mach-s5pc1xx/cache.c
+++ b/arch/arm/mach-s5pc1xx/cache.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
void enable_caches(void)
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 49dadd4c3d8..2cee6a25cb6 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_legacy.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..2b85d16ba15 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_legacy.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..d949fed2098 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_legacy.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 8e9bb63d9d2..459f8ac6477 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <mmc.h>
#include <i2c.h>
#include <serial.h>
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index abcae15ea33..ef08428a141 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <ns16550.h>
#include <spl.h>
diff --git a/arch/arm/mach-uniphier/arm32/cache-uniphier.c b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
index 023b3396f55..5075ca6396d 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_legacy.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <asm/armv7.h>
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index e5f557716b7..d4375a482fd 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_legacy.h>
#include <zynqpl.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c
index 3bbc42f508c..1672400f29a 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_legacy.h>
#include <watchdog.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c
index 339fbeb4292..5231e349839 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_legacy.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index f4a38726670..a57c2e82f44 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_legacy.h>
#include <watchdog.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..31fbddbb65c 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_legacy.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c
index cbf840f76e8..aa61fcdb3ba 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_legacy.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
index 134510b00f9..7f7ed26b687 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_legacy.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/processor.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
index 81ffc6c0943..c0aa62da3be 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_legacy.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c
index 29f863b8b44..598d0045fd9 100644
--- a/arch/m68k/lib/cache.c
+++ b/arch/m68k/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/immap.h>
#include <asm/cache.h>
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index 94114555ff5..952066b16eb 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/asm.h>
int dcache_status(void)
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index d56fd1e0f4c..6509bd4289f 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/cacheops.h>
#ifdef CONFIG_MIPS_L2_CACHE
#include <asm/cm.h>
diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c
index c5a7a3fd0a4..ca8e6a140e7 100644
--- a/arch/nds32/cpu/n1213/ae3xx/cpu.c
+++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c
@@ -15,6 +15,7 @@
/* CPU specific code */
#include <common.h>
#include <command.h>
+#include <cpu_legacy.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..f43b6960590 100644
--- a/arch/nds32/cpu/n1213/ag101/cpu.c
+++ b/arch/nds32/cpu/n1213/ag101/cpu.c
@@ -15,6 +15,7 @@
/* CPU specific code */
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <watchdog.h>
#include <asm/cache.h>
diff --git a/arch/nds32/lib/cache.c b/arch/nds32/lib/cache.c
index 27065136dd2..05e469da2fa 100644
--- a/arch/nds32/lib/cache.c
+++ b/arch/nds32/lib/cache.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_legacy.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/nios2/lib/cache.c b/arch/nios2/lib/cache.c
index c2cdee3e9e6..90bcd7c1e85 100644
--- a/arch/nios2/lib/cache.c
+++ b/arch/nios2/lib/cache.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index 08918a9d75e..0d38d6c8f36 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -13,6 +13,7 @@
#ifndef CONFIG_MPC83XX_SDRAM
#include <common.h>
+#include <cpu_legacy.h>
#include <vsprintf.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cache.c b/arch/powerpc/cpu/mpc8xx/cache.c
index 8051d3e8d23..4407a5c68ab 100644
--- a/arch/powerpc/cpu/mpc8xx/cache.c
+++ b/arch/powerpc/cpu/mpc8xx/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/processor.h>
#include <asm/ppc.h>
#include <asm/io.h>
diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c
index 41de30cc024..415e57b3c59 100644
--- a/arch/riscv/cpu/ax25/cache.c
+++ b/arch/riscv/cpu/ax25/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.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..e7176757137 100644
--- a/arch/riscv/cpu/ax25/cpu.c
+++ b/arch/riscv/cpu/ax25/cpu.c
@@ -6,6 +6,7 @@
/* CPU specific code */
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/cache.h>
/*
diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c
index 5437a122a10..b1525c046bd 100644
--- a/arch/riscv/lib/cache.c
+++ b/arch/riscv/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
void invalidate_icache_all(void)
{
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index 50490904249..98f7b59f93d 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_legacy.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/system.h>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 290ee084e5e..975d25686a1 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -20,6 +20,7 @@
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <errno.h>
#include <malloc.h>
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 90b546e7410..94d4347c8bb 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -19,6 +19,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <malloc.h>
#include <asm/control_regs.h>
#include <asm/cpu.h>
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 0939736164d..53bbbb55b5c 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -17,6 +17,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/io.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index 7d291f60f5b..5418543fbe2 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu.h>
+#include <cpu_legacy.h>
#include <debug_uart.h>
/*
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 5d5d1a9ca74..8594ec56b61 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <debug_uart.h>
#include <malloc.h>
#include <spl.h>
diff --git a/arch/xtensa/lib/cache.c b/arch/xtensa/lib/cache.c
index 8f13f1fb630..c2db450cad1 100644
--- a/arch/xtensa/lib/cache.c
+++ b/arch/xtensa/lib/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/cache.h>
/*
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index f0fbe2b4176..9dd76701061 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -17,6 +17,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <env.h>
#include <netdev.h>
diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index 88fac76ea52..64d8e4d9f76 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -15,6 +15,7 @@
#include <config.h>
#include <common.h>
+#include <cpu_legacy.h>
#include <netdev.h>
#include <status_led.h>
#include <asm/io.h>
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index 9bf824889a1..0e1d9ce8d35 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <console.h>
+#include <cpu_legacy.h>
#define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
#define FLASH_BANK_SIZE 0x200000
diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
index e1b7b2ce8a1..22276b41c94 100644
--- a/board/h2200/h2200.c
+++ b/board/h2200/h2200.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/arch/pxa.h>
#include <asm/arch/pxa-regs.h>
#include <asm/io.h>
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index 9563763dfa5..f0862c7cecd 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <ahci.h>
+#include <cpu_legacy.h>
#include <env.h>
#include <netdev.h>
#include <scsi.h>
diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
index 111e64b995f..69d9f7e91d0 100644
--- a/board/st/stih410-b2260/board.c
+++ b/board/st/stih410-b2260/board.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <linux/usb/otg.h>
#include <dwc3-sti-glue.h>
#include <dwc3-uboot.h>
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 8a7642a0aaa..13607557103 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
+#include <cpu_legacy.h>
#include <env.h>
#include <linux/printk.h>
#include <linux/kernel.h>
diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c
index d2318457b43..f64fadde033 100644
--- a/board/syteco/zmx25/zmx25.c
+++ b/board/syteco/zmx25/zmx25.c
@@ -14,6 +14,7 @@
* RedBoot tx25_misc.c Copyright (C) 2009 Red Hat
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index e9e17508a57..e64dd14afff 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <asm/arch/hardware.h>
#include <asm/arch/pxa.h>
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
index ed7ba58c647..dd6ed5f062a 100644
--- a/board/xilinx/zynqmp/cmds.c
+++ b/board/xilinx/zynqmp/cmds.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <env.h>
#include <malloc.h>
#include <asm/arch/hardware.h>
diff --git a/cmd/cache.c b/cmd/cache.c
index 2c687173a8b..96c7512cd74 100644
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
#include <command.h>
+#include <cpu_legacy.h>
#include <linux/compiler.h>
static int parse_argv(const char *);
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index b82cbe152dc..53e143b2220 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -5,6 +5,7 @@
* Copyright (C) 2012-2017 Texas Instruments Incorporated, <www.ti.com>
*/
+#include <cpu_legacy.h>
#include <asm/arch/hardware.h>
#include <asm/cache.h>
#include <asm/emif.h>
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 6fb7d658da6..93d2a3f53df 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <bootm.h>
+#include <cpu_legacy.h>
#include <env.h>
#include <fdt_support.h>
#include <linux/libfdt.h>
diff --git a/common/kgdb_stubs.c b/common/kgdb_stubs.c
index afa7d6403a6..43c7103b8d9 100644
--- a/common/kgdb_stubs.c
+++ b/common/kgdb_stubs.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <kgdb.h>
#include <serial.h>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 4715f9d3719..b8ec515129e 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <atf_common.h>
+#include <cpu_legacy.h>
#include <errno.h>
#include <spl.h>
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 1777e7e1a50..46b1dda3de5 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <errno.h>
#include <fdtdec.h>
#include <malloc.h>
diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index 56cbbac9fe1..90846d9c2b2 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <errno.h>
#include <div64.h>
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 069c63ba456..23587e56782 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <console.h>
+#include <cpu_legacy.h>
#include <asm/io.h>
#include <fs.h>
#include <zynqpl.h>
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index e5c077e4f52..6d11986fde0 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -65,6 +65,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <env.h>
#include <fdtdec.h>
#include <gzip.h>
diff --git a/include/common.h b/include/common.h
index 82b1abe698d..48eb2236279 100644
--- a/include/common.h
+++ b/include/common.h
@@ -3,7 +3,7 @@
* Common header file for U-Boot
*
* This file still includes quite a bit of stuff that should be in separate
- * headers like command.h and cpu.h. Please think before adding more things.
+ * headers like command.h. Please think before adding more things.
* Patches to remove things are welcome.
*
* (C) Copyright 2000-2009
@@ -185,14 +185,6 @@ int board_early_init_r (void);
int testdram(void);
#endif /* CONFIG_SYS_DRAM_TEST */
-/* $(CPU)/start.S */
-int icache_status (void);
-void icache_enable (void);
-void icache_disable(void);
-int dcache_status(void);
-void dcache_enable (void);
-void dcache_disable(void);
-void mmu_disable(void);
#if defined(CONFIG_ARM)
void relocate_code(ulong);
#else
diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h
index 1741f7f7a63..a14d23a36de 100644
--- a/include/cpu_legacy.h
+++ b/include/cpu_legacy.h
@@ -52,4 +52,12 @@ int checkcpu(void);
void smp_set_core_boot_addr(unsigned long addr, int corenr);
void smp_kick_all_cpus(void);
+int icache_status(void);
+void icache_enable(void);
+void icache_disable(void);
+int dcache_status(void);
+void dcache_enable(void);
+void dcache_disable(void);
+void mmu_disable(void);
+
#endif
diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c
index 03b6d65fe9b..ce247057774 100644
--- a/post/cpu/mpc83xx/ecc.c
+++ b/post/cpu/mpc83xx/ecc.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
#include <mpc83xx.h>
#include <watchdog.h>
#include <asm/io.h>
diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c
index 67130393307..b2a6fbde005 100644
--- a/post/lib_powerpc/cpu.c
+++ b/post/lib_powerpc/cpu.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu_legacy.h>
/*
* CPU test
--
2.23.0.444.g18eeb5a265-goog
More information about the U-Boot
mailing list