[U-Boot] [PATCH v3 26/42] common: Move checkcpu() out of common.h
Simon Glass
sjg at chromium.org
Tue Nov 12 19:42:35 UTC 2019
This function belongs in cpu.h so move it over.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v3: None
Changes in v2: None
arch/powerpc/cpu/mpc83xx/cpu.c | 1 +
arch/powerpc/cpu/mpc8xx/cpu.c | 1 +
arch/sh/cpu/sh4/cpu.c | 1 +
arch/x86/cpu/broadwell/cpu_from_spl.c | 1 +
arch/x86/cpu/coreboot/coreboot.c | 1 +
arch/x86/cpu/efi/app.c | 1 +
arch/x86/cpu/efi/payload.c | 1 +
arch/x86/cpu/ivybridge/cpu.c | 1 +
arch/x86/cpu/qemu/qemu.c | 1 +
arch/x86/cpu/quark/quark.c | 1 +
arch/x86/cpu/slimbootloader/slimbootloader.c | 1 +
arch/x86/cpu/tangier/tangier.c | 1 +
arch/x86/cpu/x86_64/cpu.c | 1 +
arch/x86/lib/fsp/fsp_common.c | 1 +
common/board_f.c | 1 +
include/common.h | 1 -
include/cpu_legacy.h | 10 ++++++++++
17 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 363c0ffd28..1c0d0d2632 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 6ad86e9a1d..36af7c1612 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -17,6 +17,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c
index a8b50a9ff5..d79e6ea71d 100644
--- a/arch/sh/cpu/sh4/cpu.c
+++ b/arch/sh/cpu/sh4/cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <cpu.h>
#include <netdev.h>
#include <asm/processor.h>
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index c3d4a8d547..feb0732ee9 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.h>
#include <debug_uart.h>
#include <handoff.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 9686f8ed5b..67cfcb72d7 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <fdtdec.h>
#include <usb.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c
index ba7c02bd7e..34bdc40e39 100644
--- a/arch/x86/cpu/efi/app.c
+++ b/arch/x86/cpu/efi/app.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <fdtdec.h>
#include <netdev.h>
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 225aef7bf6..019e312527 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <efi.h>
#include <errno.h>
#include <usb.h>
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index 6db9da81b7..3dffc1697e 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 5e8b4f068e..c76868fa90 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <pci.h>
#include <qfw.h>
#include <asm/irq.h>
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index d39edb2271..f598666a6b 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu.h>
#include <mmc.h>
#include <asm/io.h>
#include <asm/ioapic.h>
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index e6b174ca88..16dd4d7381 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu.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 df2c600be3..a758ac4f1e 100644
--- a/arch/x86/cpu/tangier/tangier.c
+++ b/arch/x86/cpu/tangier/tangier.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu.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 42abb23a9e..7d291f60f5 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.h>
#include <debug_uart.h>
/*
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 40ba866d77..89ad12d1f9 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.h>
#include <dm.h>
#include <errno.h>
#include <rtc.h>
diff --git a/common/board_f.c b/common/board_f.c
index 01044452bf..5dcecd66d6 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -13,6 +13,7 @@
#include <bloblist.h>
#include <console.h>
#include <cpu.h>
+#include <cpu_legacy.h>
#include <dm.h>
#include <env.h>
#include <env_internal.h>
diff --git a/include/common.h b/include/common.h
index ce08bfe11f..96bb42ce71 100644
--- a/include/common.h
+++ b/include/common.h
@@ -203,7 +203,6 @@ void trap_init (ulong);
void s_init(void);
-int checkcpu (void);
int checkicache (void);
int checkdcache (void);
void upmconfig (unsigned int, unsigned int *, unsigned int);
diff --git a/include/cpu_legacy.h b/include/cpu_legacy.h
index 75b93bc11e..03feaa63e9 100644
--- a/include/cpu_legacy.h
+++ b/include/cpu_legacy.h
@@ -39,4 +39,14 @@ u32 cpu_mask(void);
u32 cpu_dsp_mask(void);
int is_core_valid(unsigned int core);
+/**
+ * checkcpu() - perform an early check of the CPU
+ *
+ * This is used on PowerPC, SH and X86 machines as a CPU init mechanism. It is
+ * called during the pre-relocation init sequence in board_init_f().
+ *
+ * @return 0 if oK, -ve on error
+ */
+int checkcpu(void);
+
#endif
--
2.24.0.rc1.363.gb1bccd3e3d-goog
More information about the U-Boot
mailing list