From: Simon Glass Date: Mon, 30 Sep 2019 08:40:32 -0600 Subject: [U-Boot] [PATCH 01/41] common: Move legacy CPU functions to their own header In-Reply-To: <20190930144112.175618-1-sjg@chromium.org> References: <20190930144112.175618-1-sjg@chromium.org> Message-ID: <20190930144112.175618-2-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- README | 2 +- arch/arm/cpu/armv8/fsl-layerscape/mp.c | 1 + arch/arm/mach-imx/mx6/mp.c | 1 + arch/arm/mach-zynqmp/mp.c | 1 + arch/powerpc/cpu/mpc85xx/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/mp.c | 1 + arch/powerpc/cpu/mpc86xx/mp.c | 1 + cmd/mp.c | 1 + include/common.h | 8 -------- include/cpu_legacy.h | 23 +++++++++++++++++++++++ 10 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 include/cpu_legacy.h diff --git a/README b/README index 1389e8ff127..107e67fdda5 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 7627fd13e7d..1c878bc9ab6 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c index eda168d8671..36f1dc8f923 100644 --- a/arch/arm/mach-imx/mx6/mp.c +++ b/arch/arm/mach-imx/mx6/mp.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c index 2a71870ae7b..691c86a4b00 100644 --- a/arch/arm/mach-zynqmp/mp.c +++ b/arch/arm/mach-zynqmp/mp.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index bf48836036b..bba71813bcb 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 3882c95f92e..d4077a09202 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c index ce300eac5b0..40499ef9471 100644 --- a/arch/powerpc/cpu/mpc86xx/mp.c +++ b/arch/powerpc/cpu/mpc86xx/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/cmd/mp.c b/cmd/mp.c index 01d30c1ccb7..5d77c3a78d7 100644 --- a/cmd/mp.c +++ b/cmd/mp.c @@ -5,6 +5,7 @@ #include #include +#include static int cpu_status_all(void) { diff --git a/include/common.h b/include/common.h index d8f302ea92f..16c885dd3ff 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_legacy.h b/include/cpu_legacy.h new file mode 100644 index 00000000000..a99b69b9764 --- /dev/null +++ b/include/cpu_legacy.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + * Copyright 2019 Google LLC + */ + +#ifndef __CPU_LEGACY_H +#define __CPU_LEGACY_H + +#include + +/* + * 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 -- 2.23.0.444.g18eeb5a265-goog