Skip to contentSkip to conversation

Add enable method support for Exynos SoCs

PATCH New Pankaj Dubey 2 participants 5 messages Dec 10, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover Add enable method support for Exynos SoCs

Lets use CPU_METHOD_OF_DECLARE() for smp_ops instead of using it via machine descriptor. To keep compatibility of older DTBs lets not remove smp_ops hooks from machnine_descriptor.

Changes since v1:
- Dropped code removing smp_ops hooks from exynos.c
- Separated patch into three patches separating change in .c, .dtsi and updated binding Documentation.

Pankaj Dubey (3):
Documentation: bindings: Add binding doc for exynos enable method
ARM: EXYNOS: dts: add enable-method property for cpus node
ARM: EXYNOS: add CPU_METHOD_OF_DECLARE for exynos SoCs

 Documentation/devicetree/bindings/arm/cpus.txt | 1 +
 arch/arm/boot/dts/exynos3250.dtsi              | 1 +
 arch/arm/boot/dts/exynos4210.dtsi              | 1 +
 arch/arm/boot/dts/exynos4212.dtsi              | 1 +
 arch/arm/boot/dts/exynos4412.dtsi              | 1 +
 arch/arm/boot/dts/exynos5250.dtsi              | 1 +
 arch/arm/boot/dts/exynos5260.dtsi              | 1 +
 arch/arm/boot/dts/exynos5410.dtsi              | 1 +
 arch/arm/boot/dts/exynos5420-cpus.dtsi         | 1 +
 arch/arm/boot/dts/exynos5422-cpus.dtsi         | 1 +
 arch/arm/boot/dts/exynos5440.dtsi              | 1 +
 arch/arm/mach-exynos/platsmp.c                 | 2 ++
 12 files changed, 13 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/3 Documentation: bindings: Add binding doc for exynos enable method

Add "samsung,exynos-smp" as enable-method for Samsung's Exynos SoC.

---
 Documentation/devicetree/bindings/arm/cpus.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.txt +1 -0
index e6782d5..12730c8 100644
@@ -209,6 +209,7 @@ nodes to be present and contain the properties described below.
 			    "renesas,apmu"
 			    "rockchip,rk3036-smp"
 			    "rockchip,rk3066-smp"
+			    "samsung,exynos-smp"
 			    "ste,dbx500-smp"
 
 	- cpu-release-addr
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 2/3 ARM: EXYNOS: dts: add enable-method property for cpus node

In reply to Pankaj Dubey

Add the enable-method property for the cpu node on various exynosMMMM.dtsi. This is used for CPU_METHOD_OF_DECLARE to use to enable the secondary core.

---
 arch/arm/boot/dts/exynos3250.dtsi      | 1 +
 arch/arm/boot/dts/exynos4210.dtsi      | 1 +
 arch/arm/boot/dts/exynos4212.dtsi      | 1 +
 arch/arm/boot/dts/exynos4412.dtsi      | 1 +
 arch/arm/boot/dts/exynos5250.dtsi      | 1 +
 arch/arm/boot/dts/exynos5260.dtsi      | 1 +
 arch/arm/boot/dts/exynos5410.dtsi      | 1 +
 arch/arm/boot/dts/exynos5420-cpus.dtsi | 1 +
 arch/arm/boot/dts/exynos5422-cpus.dtsi | 1 +
 arch/arm/boot/dts/exynos5440.dtsi      | 1 +
 10 files changed, 10 insertions(+)
arch/arm/boot/dts/exynos3250.dtsi +1 -0
index ba17ee1..f28f669 100644
@@ -53,6 +53,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@0 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos4210.dtsi +1 -0
index 7f3a18c..6dfd98d 100644
@@ -35,6 +35,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@900 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos4212.dtsi +1 -0
index 5389011..3e8982e 100644
@@ -25,6 +25,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@A00 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos4412.dtsi +1 -0
index 40beede..faf2fb8 100644
@@ -25,6 +25,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@A00 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos5250.dtsi +1 -0
index b6d7444..580897c 100644
@@ -52,6 +52,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@0 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos5260.dtsi +1 -0
index 5818718..1af6e76 100644
@@ -32,6 +32,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu@0 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos5410.dtsi +1 -0
index 2b6adaf..b092cdc 100644
@@ -33,6 +33,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@0 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos5420-cpus.dtsi +1 -0
index 5c052d7..a587704 100644
@@ -24,6 +24,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@0 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos5422-cpus.dtsi +1 -0
index bf3c6f1..7fcdfd0 100644
@@ -23,6 +23,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu0: cpu@100 {
 			device_type = "cpu";
arch/arm/boot/dts/exynos5440.dtsi +1 -0
index 2a2e570..0a958e8 100644
@@ -50,6 +50,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "samsung,exynos-smp";
 
 		cpu@0 {
 			device_type = "cpu";
Signature · 1 line
2.7.4
#3 lore raw

PATCH v2 3/3 ARM: EXYNOS: add CPU_METHOD_OF_DECLARE for exynos SoCs

In reply to Pankaj Dubey

Add CPU_METHOD_OF_DECLARE to use enable_method property of cpus node. To keep compatibility with older DTBs lets keep older method of registering smp_ops via machine_descriptor.

---
 arch/arm/mach-exynos/platsmp.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-exynos/platsmp.c +2 -0
index 94405c7..43eec10 100644
@@ -474,3 +474,5 @@ const struct smp_operations exynos_smp_ops __initconst = {
 	.cpu_die		= exynos_cpu_die,
 #endif
 };
+
+CPU_METHOD_OF_DECLARE(exynos_smp, "samsung,exynos-smp", &exynos_smp_ops);
Signature · 1 line
2.7.4
#4 lore raw

PATCH v2 3/3 ARM: EXYNOS: add CPU_METHOD_OF_DECLARE for exynos SoCs

Quoted 14 lines · Pankaj Dubey

Add CPU_METHOD_OF_DECLARE to use enable_method property of cpus node. To keep compatibility with older DTBs lets keep older method of registering smp_ops via machine_descriptor.

---
 arch/arm/mach-exynos/platsmp.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-exynos/platsmp.c +0 -0
index 94405c7..43eec10 100644

arch/arm/mach-exynos/platsmp.c const struct smp_operations exynos_smp_ops __initconst = { · line 478

Quoted 5 lines
arch/arm/mach-exynos/platsmp.c +2 -0
@@ -474,3 +474,5 @@ const struct smp_operations exynos_smp_ops __initconst = {
 	.cpu_die		= exynos_cpu_die,
 #endif
 };
+
+CPU_METHOD_OF_DECLARE(exynos_smp, "samsung,exynos-smp", &exynos_smp_ops);

Are you sure that smp_ops from DT will be set after mdesc->smp? The arm_dt_init_cpu_maps() is called before smp_set_ops(mdesc->smp)... Have you actually tried this?

Best regards,
Krzysztof