common: Move older CPU functions to their own header
authorSimon Glass <sjg@chromium.org>
Thu, 14 Nov 2019 19:57:09 +0000 (12:57 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 2 Dec 2019 23:23:06 +0000 (18:23 -0500)
These should be moved to driver model, but in the meantime, move them
out of the common header to help reduce its size.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
README
arch/arm/cpu/armv8/fsl-layerscape/mp.c
arch/arm/mach-imx/mx6/mp.c
arch/arm/mach-zynqmp/mp.c
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/mpc85xx/mp.c
arch/powerpc/cpu/mpc86xx/mp.c
cmd/mp.c
include/common.h
include/cpu_func.h [new file with mode: 0644]

diff --git a/README b/README
index 1389e8ff127f38f4a404bd4410bafa989f432158..107e67fdda5ae38211edb487e24dddf381f46879 100644 (file)
--- a/README
+++ b/README
@@ -2983,7 +2983,7 @@ Low Level (hardware related) configuration options:
 - CONFIG_SYS_SRIOn_MEM_VIRT:
                Virtual Address of SRIO port 'n' memory region
 
-- CONFIG_SYS_SRIOn_MEM_PHYS:
+- CONFIG_SYS_SRIOn_MEM_PHYxS:
                Physical Address of SRIO port 'n' memory region
 
 - CONFIG_SYS_SRIOn_MEM_SIZE:
index 7627fd13e7d87995c2d19ae2ed4a6c38a279b439..ca07c68863b8b90376ecf90fa437638de960c018 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/arch/mp.h>
index eda168d8671115f1da535d79393398006fd85e49..2fdf070a08b4f04f2d364bb3011329ff3bdffc1f 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
index 2a71870ae7bccd81dbbe3b3a1db5db063a3379db..fbb551151abbe7f71e82b8302fb2d972aeebf2eb 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
index bf48836036b89ff4c1d2d4ae06c12487dd8b6305..5344b175a45d3975dcc7a5a48dd070f4c1d27427 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <cpu_func.h>
 #include <watchdog.h>
 #include <command.h>
 #include <fsl_esdhc.h>
index 3882c95f92eae4a298d1bd357560ae7faf61c168..9757bffe025d5f6a4f06bcbbed6efb608a284b2d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <env.h>
 #include <asm/processor.h>
 #include <env.h>
index ce300eac5b0e858cf1d8340016389449d3e70568..07c4c079df3dd0fe38ea11f628fe3f7e65eb2323 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <ioports.h>
index 01d30c1ccb74762c2701fcd8aa31f2e7e6c1658c..4c8f5fc3fae4545a44df5a04c18e7f4e5b3157ab 100644 (file)
--- a/cmd/mp.c
+++ b/cmd/mp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <cpu_func.h>
 
 static int cpu_status_all(void)
 {
index d8f302ea92f059680753f53d3583fc25c9cb8740..16c885dd3ff00b30f8b572df700897abb823344b 100644 (file)
@@ -355,14 +355,6 @@ static inline struct in_addr env_get_ip(char *var)
 void show_activity(int arg);
 #endif
 
-/* Multicore arch functions */
-#ifdef CONFIG_MP
-int cpu_status(u32 nr);
-int cpu_reset(u32 nr);
-int cpu_disable(u32 nr);
-int cpu_release(u32 nr, int argc, char * const argv[]);
-#endif
-
 #else  /* __ASSEMBLY__ */
 
 #endif /* __ASSEMBLY__ */
diff --git a/include/cpu_func.h b/include/cpu_func.h
new file mode 100644 (file)
index 0000000..a99b69b
--- /dev/null
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ * Copyright 2019 Google LLC
+ */
+
+#ifndef __CPU_LEGACY_H
+#define __CPU_LEGACY_H
+
+#include <linux/types.h>
+
+/*
+ * Multicore arch functions
+ *
+ * These should be moved to use the CPU uclass.
+ */
+int cpu_status(u32 nr);
+int cpu_reset(u32 nr);
+int cpu_disable(u32 nr);
+int cpu_release(u32 nr, int argc, char * const argv[]);
+
+#endif