common: Move some CPU functions out of common.h
authorSimon Glass <sjg@chromium.org>
Thu, 14 Nov 2019 19:57:32 +0000 (12:57 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 2 Dec 2019 23:23:13 +0000 (18:23 -0500)
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 <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
arch/arm/cpu/armv8/s32v234/cpu.c
arch/powerpc/cpu/mpc85xx/speed.c
arch/powerpc/cpu/mpc86xx/cpu.c
arch/powerpc/cpu/mpc8xxx/cpu.c
arch/powerpc/cpu/mpc8xxx/fdt.c
board/freescale/qemu-ppce500/qemu-ppce500.c
include/common.h

index 374fde6..6c87c1b 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <env.h>
 #include <fsl_ddr_sdram.h>
 #include <vsprintf.h>
index 6d82cfe..25e9a49 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
 #include <asm/processor.h>
index ede9674..4b047a3 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <linux/compiler.h>
 #include <fsl_ifc.h>
 #include <asm/processor.h>
index b4cb67a..b5a9513 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
index acc2f2b..15b05fc 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <ppc_asm.tmpl>
 #include <linux/compiler.h>
 #include <asm/processor.h>
index 1c3c782..bb14444 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
index 467eac4..ed482a9 100644 (file)
@@ -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>
index 0d877c4..485c2d4 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/mp.h>
index fb36d83..4a5ab72 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <cpu_func.h>
 #include <env.h>
 #include <pci.h>
 #include <asm/processor.h>
index 9926751..4de0503 100644 (file)
@@ -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);