Skip to contentSkip to conversation

[Add SMP support for Allwinner A20: PATCH V4 0/3]

PATCH Superseded Fan Rong 2 participants 5 messages Oct 1, 2013 – Oct 2, 2013

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Fan Rong

author
#0 lore raw

v4 cover [Add SMP support for Allwinner A20: PATCH V4 0/3]

This is the version 4 patch. It use smp_prepare_cpus replacing early_init as cpuconfigure map init funcation caller and use sun7i replacing sunxi7i as funcation name and variable name.

Fan Rong (3):
Add smp support for Allwinner A20(sunxi 7i).
Add cpuconfig nodes in dts for smp configure.
Add arch count timer node in dts for Allwinner A20(sunxi 7i).

 arch/arm/boot/dts/sun7i-a20.dtsi |  15 ++++++
 arch/arm/mach-sunxi/Makefile     |   2 +
 arch/arm/mach-sunxi/headsmp.S    |  18 +++++++
 arch/arm/mach-sunxi/platsmp.c    | 114 +++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-sunxi/sunxi.c      |   3 ++
 5 files changed, 152 insertions(+)
 create mode 100644 arch/arm/mach-sunxi/headsmp.S
 create mode 100644 arch/arm/mach-sunxi/platsmp.c
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH v4 1/3 Add smp support for Allwinner A20(sunxi 7i).

---
 arch/arm/mach-sunxi/Makefile  |   2 +
 arch/arm/mach-sunxi/headsmp.S |  18 +++++++
 arch/arm/mach-sunxi/platsmp.c | 114 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-sunxi/sunxi.c   |   3 ++
 4 files changed, 137 insertions(+)
 create mode 100644 arch/arm/mach-sunxi/headsmp.S
 create mode 100644 arch/arm/mach-sunxi/platsmp.c
arch/arm/mach-sunxi/Makefile +2 -0
index 93bebfc..d7f1ef4 100644
@@ -1 +1,3 @@
 obj-$(CONFIG_ARCH_SUNXI) += sunxi.o
+obj-$(CONFIG_ARCH_SUNXI) += platsmp.o
+obj-$(CONFIG_ARCH_SUNXI) += headsmp.o
arch/arm/mach-sunxi/headsmp.S new file +18 -0
new file mode 100644
index 0000000..48c9d33
@@ -0,0 +1,18 @@
+/*
+ * SMP support for A20
+ *
+ *  Copyright (C) 2013 Fan Rong <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/linkage.h>
+#include <linux/init.h>
+
+.section ".text.head", "ax"
+ENTRY(sun7i_secondary_startup)
+	msr cpsr_fsxc,#0xd3
+	b secondary_startup
+ENDPROC(sun7i_secondary_startup)
arch/arm/mach-sunxi/platsmp.c new file +114 -0

114 lines not on this page · raw message

arch/arm/mach-sunxi/sunxi.c +3 -0
index e79fb34..b2e6eff 100644
@@ -26,6 +26,8 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
+extern struct smp_operations sun7i_smp_ops;
+
 #define SUN4I_WATCHDOG_CTRL_REG		0x00
 #define SUN4I_WATCHDOG_CTRL_RESTART		BIT(0)
 #define SUN4I_WATCHDOG_MODE_REG		0x04
@@ -139,6 +141,7 @@ static const char * const sunxi_board_dt_compat[] = {
 };
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
+	.smp	= smp_ops(sun7i_smp_ops),
 	.init_machine	= sunxi_dt_init,
 	.init_time	= sunxi_timer_init,
 	.dt_compat	= sunxi_board_dt_compat,
Signature · 1 line
1.8.1.2
author
#2 lore raw

PATCH v4 2/3 Add cpuconfig nodes in dts for smp configure.

In reply to Fan Rong
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +5 -0
index 999ff45..e1bff17 100644
@@ -167,6 +167,11 @@
 		#size-cells = <1>;
 		ranges;
 
+		cpuconfig: cpuconfig at 01c25c00 {
+			compatible = "allwinner,sun7i-a20-cpuconfig";
+			reg = <0x01c25c00 0x400>;
+		};
+
 		pio: pinctrl at 01c20800 {
 			compatible = "allwinner,sun7i-a20-pinctrl";
 			reg = <0x01c20800 0x400>;
Signature · 1 line
1.8.1.2
author
#3 lore raw

PATCH v4 3/3 Add arch count timer node in dts for Allwinner A20(sunxi 7i).

In reply to Fan Rong
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +10 -0
index e1bff17..8d5e318 100644
@@ -312,5 +312,15 @@
 			#interrupt-cells = <3>;
 			interrupts = <1 9 0xf04>;
 		};
+
+		timer {
+			compatible ="arm,armv7-timer";
+			interrupts = <1 13 0x308>,
+				     <1 14 0x308>,
+				     <1 11 0x308>,
+				     <1 10 0x308>;
+			clock-frequency = <24000000>;
+		};
+
 	};
 };
Signature · 1 line
1.8.1.2
#4 lore raw
In reply to Fan Rong
Quoted 1 line · Fan Rong

This is the version 4 patch. It use smp_prepare_cpus replacing early_init as cpuconfigure map init funcation caller and use sun7i replacing sunxi7i as funcation name and variable name.

Hi Fan,

your patchset does not have a changelog neither a description. You should fix this first if you want a proper review.

Thanks
-- Daniel

Quoted 15 lines

Fan Rong (3):
Add smp support for Allwinner A20(sunxi 7i).
Add cpuconfig nodes in dts for smp configure.
Add arch count timer node in dts for Allwinner A20(sunxi 7i).

  arch/arm/boot/dts/sun7i-a20.dtsi |  15 ++++++
  arch/arm/mach-sunxi/Makefile     |   2 +
  arch/arm/mach-sunxi/headsmp.S    |  18 +++++++
  arch/arm/mach-sunxi/platsmp.c    | 114 +++++++++++++++++++++++++++++++++++++++
  arch/arm/mach-sunxi/sunxi.c      |   3 ++
  5 files changed, 152 insertions(+)

create mode 100644 arch/arm/mach-sunxi/headsmp.S create mode 100644 arch/arm/mach-sunxi/platsmp.c

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog