aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-11-14 12:57:09 -0700
committerTom Rini <trini@konsulko.com>2019-12-02 18:23:06 -0500
commit62f9b654472888dc46feea74f95edb837f49333a (patch)
tree2ba027312db362b0680f990fd5d55c3508e3fb51
parentdd38416d6b354acb5d12e2bd1fd45e7e63b8a605 (diff)
downloadu-boot-62f9b654472888dc46feea74f95edb837f49333a.zip
u-boot-62f9b654472888dc46feea74f95edb837f49333a.tar.gz
u-boot-62f9b654472888dc46feea74f95edb837f49333a.tar.bz2
common: Move older CPU functions to their own header
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>
-rw-r--r--README2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/mp.c1
-rw-r--r--arch/arm/mach-imx/mx6/mp.c1
-rw-r--r--arch/arm/mach-zynqmp/mp.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mp.c1
-rw-r--r--arch/powerpc/cpu/mpc86xx/mp.c1
-rw-r--r--cmd/mp.c1
-rw-r--r--include/common.h8
-rw-r--r--include/cpu_func.h23
10 files changed, 31 insertions, 9 deletions
diff --git a/README b/README
index 1389e8f..107e67f 100644
--- 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:
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 7627fd1..ca07c68 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/arch/mp.h>
diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c
index eda168d..2fdf070 100644
--- a/arch/arm/mach-imx/mx6/mp.c
+++ b/arch/arm/mach-imx/mx6/mp.c
@@ -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>
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index 2a71870..fbb5511 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -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>
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index bf48836..5344b17 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -10,6 +10,7 @@
#include <config.h>
#include <common.h>
+#include <cpu_func.h>
#include <watchdog.h>
#include <command.h>
#include <fsl_esdhc.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 3882c95..9757bff 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <env.h>
#include <asm/processor.h>
#include <env.h>
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index ce300ea..07c4c07 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <ioports.h>
diff --git a/cmd/mp.c b/cmd/mp.c
index 01d30c1..4c8f5fc 100644
--- 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)
{
diff --git a/include/common.h b/include/common.h
index d8f302e..16c885d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
index 0000000..a99b69b
--- /dev/null
+++ b/include/cpu_func.h
@@ -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