From b5981474f1f7d8b6b6669d549298dec3fc083cc8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 14 Nov 2019 12:57:32 -0700 Subject: [PATCH] common: Move some CPU functions out of common.h These functions belong in cpu_func.h since they do not use driver model. Move them over. Don't bother adding comments since these functions should be deleted. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + .../armv8/fsl-layerscape/fsl_lsch2_speed.c | 1 + .../armv8/fsl-layerscape/fsl_lsch3_speed.c | 1 + arch/arm/cpu/armv8/s32v234/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/speed.c | 1 + arch/powerpc/cpu/mpc86xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xxx/cpu.c | 1 + arch/powerpc/cpu/mpc8xxx/fdt.c | 1 + board/freescale/qemu-ppce500/qemu-ppce500.c | 1 + include/common.h | 20 ------------------- 10 files changed, 9 insertions(+), 20 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 374fde6b65..6c87c1b11a 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include 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 6d82cfeb58..25e9a495f7 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 +#include #include #include #include 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 ede96742aa..4b047a39c0 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 +#include #include #include #include diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c index b4cb67a66a..b5a9513ead 100644 --- a/arch/arm/cpu/armv8/s32v234/cpu.c +++ b/arch/arm/cpu/armv8/s32v234/cpu.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index acc2f2bb81..15b05fcc51 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index 1c3c78217c..bb14444a2e 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 467eac4a2e..ed482a9c09 100644 --- a/arch/powerpc/cpu/mpc8xxx/cpu.c +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index 0d877c43be..485c2d4feb 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index fb36d8366c..4a5ab72b1f 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 992675100d..4de05032b2 100644 --- a/include/common.h +++ b/include/common.h @@ -203,26 +203,6 @@ void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); ulong get_endaddr (void); void trap_init (ulong); -/* $(CPU)/cpu.c */ -static inline int cpumask_next(int cpu, unsigned int mask) -{ - for (cpu++; !((1 << cpu) & mask); cpu++) - ; - - return cpu; -} - -#define for_each_cpu(iter, cpu, num_cpus, mask) \ - for (iter = 0, cpu = cpumask_next(-1, mask); \ - iter < num_cpus; \ - iter++, cpu = cpumask_next(cpu, mask)) \ - -int cpu_numcores (void); -int cpu_num_dspcores(void); -u32 cpu_mask (void); -u32 cpu_dsp_mask(void); -int is_core_valid (unsigned int); - void s_init(void); int checkcpu (void); -- 2.39.5