ARM: sun6i: Switch to enable-method for SMP
Subsystems (4)
cover ARM: sun6i: Switch to enable-method for SMP
The recent introduction of CPU_METHOD_OF_DECLARE allowed to deprecate one more fiel of the struct machine_desc.
Switch to it for the Allwinner A31 SoC.
Maxime Ripard (5):
Documentation: dt: bindings: Document ARM PSCI enable method
ARM: sun6i: Use CPU_METHOD_OF_DECLARE
Documentation: dt: bindings: Document Allwinner A31 enable method
ARM: sun6i: Define the A31 CPUs enable-method
ARM: sun6i: Retire the smp field in A31 machine
Documentation/devicetree/bindings/arm/cpus.txt | 2 ++ arch/arm/boot/dts/sun6i-a31.dtsi | 1 + arch/arm/mach-sunxi/common.h | 19 ------------------- arch/arm/mach-sunxi/platsmp.c | 3 +-- arch/arm/mach-sunxi/sunxi.c | 3 --- 5 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 arch/arm/mach-sunxi/common.h
Signature · 1 line
1.9.1
PATCH 1/5 Documentation: dt: bindings: Document ARM PSCI enable method
arm,psci is also a valid enable-method for the CPUs on ARM. Document it.
--- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.txt +1 -0
@@ -182,6 +182,7 @@ nodes to be present and contain the properties described below. "psci" # On ARM 32-bit systems this property is optional and can be one of: + "arm,psci" "qcom,gcc-msm8660" "qcom,kpss-acc-v1" "qcom,kpss-acc-v2"
Signature · 1 line
1.9.1
PATCH 2/5 ARM: sun6i: Use CPU_METHOD_OF_DECLARE
In reply to Maxime RipardCPU_METHOD_OF_DECLARE allows to bind the smp_ops to a set of cpus through the enable-method property, instead of relying on the machine to define it. Switch to it to get closer to an empty machine.
--- arch/arm/mach-sunxi/platsmp.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sunxi/platsmp.c +1 -0
@@ -122,3 +122,4 @@ struct smp_operations sun6i_smp_ops __initdata = { .smp_prepare_cpus = sun6i_smp_prepare_cpus, .smp_boot_secondary = sun6i_smp_boot_secondary, }; +CPU_METHOD_OF_DECLARE (sun6i_smp,"allwinner,sun6i-a31" , &sun6i_smp_ops);
Signature · 1 line
1.9.1
PATCH 3/5 Documentation: dt: bindings: Document Allwinner A31 enable method
In reply to Maxime RipardDocument the necently introduced A31 enable-method as a valid option.
--- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.txt +1 -0
@@ -183,6 +183,7 @@ nodes to be present and contain the properties described below. # On ARM 32-bit systems this property is optional and can be one of: "arm,psci" + "allwinner,sun6i-a31" "qcom,gcc-msm8660" "qcom,kpss-acc-v1" "qcom,kpss-acc-v2"
Signature · 1 line
1.9.1
PATCH 4/5 ARM: sun6i: Define the A31 CPUs enable-method
In reply to Maxime RipardThat will allow to use the CPU_METHOD_OF_DECLARE definition we did previously.
--- arch/arm/boot/dts/sun6i-a31.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/sun6i-a31.dtsi +1 -0
@@ -27,6 +27,7 @@ cpus { + enable-method = "allwinner,sun6i-a31"; #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
1.9.1
PATCH 5/5 ARM: sun6i: Retire the smp field in A31 machine
In reply to Maxime RipardNow that we can rely on the enable-method, remove the smp field declaration from A31 machine.
--- arch/arm/mach-sunxi/common.h | 19 ------------------- arch/arm/mach-sunxi/platsmp.c | 2 -- arch/arm/mach-sunxi/sunxi.c | 3 --- 3 files changed, 24 deletions(-) delete mode 100644 arch/arm/mach-sunxi/common.h
arch/arm/mach-sunxi/common.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* Core functions for Allwinner SoCs -* -* Copyright (C) 2013 Maxime Ripard -* -* Maxime Ripard <[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __ARCH_SUNXI_COMMON_H_ -#define __ARCH_SUNXI_COMMON_H_ - -void sun6i_secondary_startup (void ); -extern struct smp_operations sun6i_smp_ops; - -#endif /* __ARCH_SUNXI_COMMON_H_ */
arch/arm/mach-sunxi/platsmp.c +0 -2
@@ -21,8 +21,6 @@#include <linux/of_address.h> #include <linux/smp.h> -#include "common.h" -#define CPUCFG_CPU_PWR_CLAMP_STATUS_REG (cpu) ((cpu) * 0x40 + 0x64)#define CPUCFG_CPU_RST_CTRL_REG (cpu) (((cpu) + 1) * 0x40)#define CPUCFG_CPU_CTRL_REG (cpu) (((cpu) + 1) * 0x40 + 0x04)
arch/arm/mach-sunxi/sunxi.c +0 -3
@@ -25,8 +25,6 @@#include <asm/mach/map.h> #include <asm/system_misc.h> -#include "common.h" -#define SUN4I_WATCHDOG_CTRL_REG 0x00#define SUN4I_WATCHDOG_CTRL_RESTART BIT(0)#define SUN4I_WATCHDOG_MODE_REG 0x04
@@ -149,7 +147,6 @@ DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") .init_time = sun6i_timer_init, .dt_compat = sun6i_board_dt_compat, .restart = sun6i_restart, - .smp = smp_ops(sun6i_smp_ops),MACHINE_END static const char * const sun7i_board_dt_compat[] = {
Signature · 1 line
1.9.1
cover ARM: sun6i: Switch to enable-method for SMP
In reply to Maxime RipardQuoted 4 lines · Maxime Ripard
The recent introduction of
CPU_METHOD_OF_DECLAREallowed to deprecate one more fiel of the structmachine_desc.Switch to it for the Allwinner A31 SoC.
Merged the whole series.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140517/011b9265/attachment-0001.sig>