common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
index 5117177..4c59a44 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/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 0dc4ebf..99eb7db 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/ls102xa/ls102xa_psci.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
index df64f54..4a4b3c6 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/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 8dc0ac9..11f9b4d 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 5cd4a95..d4dfe7f 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/lib/cache.c b/arch/arm/lib/cache.c
index 463d283..007d4eb 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/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 467d0d5..1785550 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-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c
index c98d2e9..c8f6ca2 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-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index b45d3ee..e9b3e74 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-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c
index 65b1cfc..a448f2d 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/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 01c5d57..efd5acf 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/lib/reloc.c b/arch/mips/lib/reloc.c
index c6a517d..e68f494 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 976978c..b4bcdf8 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.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 dbd328c..ec18df8 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/sections.h>
 #include <mach/jz4780.h>
diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c
index 75763c4..3cd4408 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 a53bed1..0660fff 100644
--- a/arch/nds32/cpu/n1213/ae3xx/cpu.c
+++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c
@@ -16,6 +16,7 @@
 #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/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 1fc7921..05b26e8 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu.h>
+#include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
 #include <asm/cache.h>
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 485d5ae..a68b091 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 84691b7..f2e670e 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 2d36c3a..3c3c470 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/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c
index 0534b37..f092600 100644
--- a/arch/riscv/cpu/ax25/cpu.c
+++ b/arch/riscv/cpu/ax25/cpu.c
@@ -7,6 +7,7 @@
 /* CPU specific code */
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/cache.h>
 
 /*
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index cc66f15..7054378 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 bea8695..a544df0 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 f3af88d..ff74303 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/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 51f9659..1b764df 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <malloc.h>
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 93eea53..057b229 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>