Skip to contentSkip to conversation

irqchip: Move Exynos PM to use stacked domains

PATCH Superseded Marc Zyngier 3 participants 6 messages Feb 23, 2015 – Feb 25, 2015

Subsystems (4)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover irqchip: Move Exynos PM to use stacked domains

This series is extracted from [4], which is trying to remove all traces of gic_arch_extn from the tree. As some maintainers are more responsive than others (understatement of the year...), I've decided to split it per sub-arch, and get it moving, at least partially.

This series addresses Exynos by converting its PM support to a stacked domain on top of the standard GIC.

Based on 4.0-rc1.

* From v4: [4]
- Extracted from the full series
- Rebased on 4.0-rc1

* From v3 [3]:
- Rebased on top of the patch working around hardcoded IRQ on OMAP4/5 [4]
- Fixed more iMX6 DTs (Stephan)
- Fixed Exynos4/5 DTs

* From v2 [2]:
- Addressed numerous comments from Thierry
- Merged bug fixes from Nishanth
- Merged bug fix from Stefan

* From v1 [1]:
- Rebased on 3.19-rc3
- Fixed a number of additional platforms
- Added crossbar conversion to stacked domains
- Merged bug fixes from Nishanth

[4]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/317531.html
[3]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315385.html
[2]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314041.html
[1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/307338.html

Marc Zyngier (2):
ARM: exynos4/5: convert pmu wakeup to stacked domains
DT: exynos: update PMU binding

 .../devicetree/bindings/arm/samsung/pmu.txt        |  17 +++
 arch/arm/boot/dts/exynos4.dtsi                     |   4 +
 arch/arm/boot/dts/exynos5250.dtsi                  |   4 +
 arch/arm/boot/dts/exynos5420.dtsi                  |   4 +
 arch/arm/mach-exynos/exynos.c                      |  14 +--
 arch/arm/mach-exynos/suspend.c                     | 122 +++++++++++++++++++--
 6 files changed, 146 insertions(+), 19 deletions(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH v5 1/2 ARM: exynos4/5: convert pmu wakeup to stacked domains

Exynos has been (ab)using the gic_arch_extn to provide wakeup from suspend, and it makes a lot of sense to convert this code to use stacked domains instead.

This patch does just this, updating the DT files to actually reflect what the HW provides.

BIG FAT WARNING: because the DTs were so far lying by not exposing the fact that the PMU block is actually the first interrupt controller in the chain for RTC, kernels with this patch applied wont have any suspend-resume facility when booted with old DTs, and old kernels with updated DTs may not even boot.

Also, I stronly suspect that there is more than two wake-up interrupts on these platforms, but I leave it to the maintainers to fix their mess.

---
 arch/arm/boot/dts/exynos4.dtsi    |   4 ++
 arch/arm/boot/dts/exynos5250.dtsi |   4 ++
 arch/arm/boot/dts/exynos5420.dtsi |   4 ++
 arch/arm/mach-exynos/exynos.c     |  14 ++---
 arch/arm/mach-exynos/suspend.c    | 122 ++++++++++++++++++++++++++++++++++----
 5 files changed, 129 insertions(+), 19 deletions(-)
arch/arm/boot/dts/exynos4.dtsi +4 -0
index 76173ca..1d21f02 100644
@@ -152,6 +152,9 @@
 	pmu_system_controller: system-controller at 10020000 {
 		compatible = "samsung,exynos4210-pmu", "syscon";
 		reg = <0x10020000 0x4000>;
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		interrupt-parent = <&gic>;
 	};
 
 	dsi_0: dsi at 11C80000 {
@@ -264,6 +267,7 @@
 	rtc at 10070000 {
 		compatible = "samsung,s3c6410-rtc";
 		reg = <0x10070000 0x100>;
+		interrupt-parent = <&pmu_system_controller>;
 		interrupts = <0 44 0>, <0 45 0>;
 		clocks = <&clock CLK_RTC>;
 		clock-names = "rtc";
arch/arm/boot/dts/exynos5250.dtsi +4 -0
index 9bb1b0b..72fa2d1 100644
@@ -196,6 +196,9 @@
 		clock-names = "clkout16";
 		clocks = <&clock CLK_FIN_PLL>;
 		#clock-cells = <1>;
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		interrupt-parent = <&gic>;
 	};
 
 	sysreg_system_controller: syscon at 10050000 {
@@ -232,6 +235,7 @@
 	rtc: rtc at 101E0000 {
 		clocks = <&clock CLK_RTC>;
 		clock-names = "rtc";
+		interrupt-parent = <&pmu_system_controller>;
 		status = "disabled";
 	};
 
arch/arm/boot/dts/exynos5420.dtsi +4 -0
index 9dc2e97..d11a6ab 100644
@@ -327,6 +327,7 @@
 	rtc: rtc at 101E0000 {
 		clocks = <&clock CLK_RTC>;
 		clock-names = "rtc";
+		interrupt-parent = <&pmu_system_controller>;
 		status = "disabled";
 	};
 
@@ -769,6 +770,9 @@
 		clock-names = "clkout16";
 		clocks = <&clock CLK_FIN_PLL>;
 		#clock-cells = <1>;
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		interrupt-parent = <&gic>;
 	};
 
 	sysreg_system_controller: syscon at 10050000 {
arch/arm/mach-exynos/exynos.c +5 -9
index 9e9dfdf..c623d39 100644
@@ -166,16 +166,15 @@ static void __init exynos_init_io(void)
 	exynos_map_io();
 }
 
+/*
+ * Apparently, these SoCs are not able to wake-up from suspend using
+ * the PMU. Too bad. Should they suddenly become capable of such a
+ * feat, the matches below should be moved to suspend.c.
+ */
 static const struct of_device_id exynos_dt_pmu_match[] = {
 	{ .compatible = "samsung,exynos3250-pmu" },
-	{ .compatible = "samsung,exynos4210-pmu" },
-	{ .compatible = "samsung,exynos4212-pmu" },
-	{ .compatible = "samsung,exynos4412-pmu" },
-	{ .compatible = "samsung,exynos4415-pmu" },
-	{ .compatible = "samsung,exynos5250-pmu" },
 	{ .compatible = "samsung,exynos5260-pmu" },
 	{ .compatible = "samsung,exynos5410-pmu" },
-	{ .compatible = "samsung,exynos5420-pmu" },
 	{ /*sentinel*/ },
 };
 
@@ -186,9 +185,6 @@ static void exynos_map_pmu(void)
 	np = of_find_matching_node(NULL, exynos_dt_pmu_match);
 	if (np)
 		pmu_base_addr = of_iomap(np, 0);
-
-	if (!pmu_base_addr)
-		panic("failed to find exynos pmu register\n");
 }
 
 static void __init exynos_init_irq(void)
arch/arm/mach-exynos/suspend.c +112 -10

156 lines not on this page · raw message

Signature · 1 line
2.1.4
#2 lore raw

PATCH v5 2/2 DT: exynos: update PMU binding

In reply to Marc Zyngier

Document the fact that some Exynos PMUs are capable of acting as an interrupt controller.

---
 Documentation/devicetree/bindings/arm/samsung/pmu.txt | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
Documentation/devicetree/bindings/arm/samsung/pmu.txt +17 -0
index 67b2113..2d6356d 100644
@@ -29,10 +29,27 @@ Properties:
  - clocks : list of phandles and specifiers to all input clocks listed in
 		clock-names property.
 
+Optional properties:
+
+Some PMUs are capable of behaving as an interrupt controller (mostly
+to wake up a suspended PMU). In which case, they can have the
+following properties:
+
+- interrupt-controller: indicate that said PMU is an interrupt controller
+
+- #interrupt-cells: must be identical to the that of the parent interrupt
+  controller.
+
+- interrupt-parent: a phandle indicating which interrupt controller
+  this PMU signals interrupts to.
+
 Example :
 pmu_system_controller: system-controller at 10040000 {
 	compatible = "samsung,exynos5250-pmu", "syscon";
 	reg = <0x10040000 0x5000>;
+	interrupt-controller;
+	#interrupt-cells = <3>;
+	interrupt-parent = <&gic>;
 	#clock-cells = <1>;
 	clock-names = "clkout0", "clkout1", "clkout2", "clkout3",
 			"clkout4", "clkout8", "clkout9";
Signature · 1 line
2.1.4
#3 lore raw

v5 cover irqchip: Move Exynos PM to use stacked domains

In reply to Marc Zyngier

Hi Mark,

Quoted 39 lines · Marc Zyngier

This series is extracted from [4], which is trying to remove all traces of gic_arch_extn from the tree. As some maintainers are more responsive than others (understatement of the year...), I've decided to split it per sub-arch, and get it moving, at least partially.

This series addresses Exynos by converting its PM support to a stacked domain on top of the standard GIC.

Based on 4.0-rc1.

* From v4: [4]
- Extracted from the full series
- Rebased on 4.0-rc1

* From v3 [3]:
- Rebased on top of the patch working around hardcoded IRQ on OMAP4/5 [4]
- Fixed more iMX6 DTs (Stephan)
- Fixed Exynos4/5 DTs

* From v2 [2]:
- Addressed numerous comments from Thierry
- Merged bug fixes from Nishanth
- Merged bug fix from Stefan

* From v1 [1]:
- Rebased on 3.19-rc3
- Fixed a number of additional platforms
- Added crossbar conversion to stacked domains
- Merged bug fixes from Nishanth

[4]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/317531.html
[3]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315385.html
[2]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314041.html
[1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/307338.html

Marc Zyngier (2):
ARM: exynos4/5: convert pmu wakeup to stacked domains
DT: exynos: update PMU binding

Quoted 8 lines
  .../devicetree/bindings/arm/samsung/pmu.txt        |  17 +++
  arch/arm/boot/dts/exynos4.dtsi                     |   4 +
  arch/arm/boot/dts/exynos5250.dtsi                  |   4 +
  arch/arm/boot/dts/exynos5420.dtsi                  |   4 +
  arch/arm/mach-exynos/exynos.c                      |  14 +--
  arch/arm/mach-exynos/suspend.c                     | 122 +++++++++++++++++++--
  6 files changed, 146 insertions(+), 19 deletions(-)

I tested and verified S2R functionality on Exynos5250 based SMDK5250 board, and suspend-resume working fine. For testing on SMDK5250 you can add my tested-by.

Thanks,
Pankaj Dubey

#4 lore raw

v5 cover irqchip: Move Exynos PM to use stacked domains

Hi Pakaj,

Quoted 51 lines · Pankaj Dubey

Hi Mark,

Quoted 39 lines · Marc Zyngier

This series is extracted from [4], which is trying to remove all traces of gic_arch_extn from the tree. As some maintainers are more responsive than others (understatement of the year...), I've decided to split it per sub-arch, and get it moving, at least partially.

This series addresses Exynos by converting its PM support to a stacked domain on top of the standard GIC.

Based on 4.0-rc1.

* From v4: [4]
- Extracted from the full series
- Rebased on 4.0-rc1

* From v3 [3]:
- Rebased on top of the patch working around hardcoded IRQ on OMAP4/5 [4]
- Fixed more iMX6 DTs (Stephan)
- Fixed Exynos4/5 DTs

* From v2 [2]:
- Addressed numerous comments from Thierry
- Merged bug fixes from Nishanth
- Merged bug fix from Stefan

* From v1 [1]:
- Rebased on 3.19-rc3
- Fixed a number of additional platforms
- Added crossbar conversion to stacked domains
- Merged bug fixes from Nishanth

[4]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/317531.html
[3]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315385.html
[2]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314041.html
[1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/307338.html

Marc Zyngier (2):
ARM: exynos4/5: convert pmu wakeup to stacked domains
DT: exynos: update PMU binding

Quoted 8 lines
  .../devicetree/bindings/arm/samsung/pmu.txt        |  17 +++
  arch/arm/boot/dts/exynos4.dtsi                     |   4 +
  arch/arm/boot/dts/exynos5250.dtsi                  |   4 +
  arch/arm/boot/dts/exynos5420.dtsi                  |   4 +
  arch/arm/mach-exynos/exynos.c                      |  14 +--
  arch/arm/mach-exynos/suspend.c                     | 122 +++++++++++++++++++--
  6 files changed, 146 insertions(+), 19 deletions(-)
Quoted 5 lines

I tested and verified S2R functionality on Exynos5250 based SMDK5250 board, and suspend-resume working fine. For testing on SMDK5250 you can add my tested-by.

Thanks. Will you or Kukjin get that merged directly?

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#5 lore raw

v5 cover irqchip: Move Exynos PM to use stacked domains

Quoted 3 lines · Marc Zyngier

Hi Pakaj,

Hi Marc and Pankaj,

Quoted 52 lines · Pankaj Dubey
Quoted 51 lines

Hi Mark,

Quoted 47 lines · Marc Zyngier

This series is extracted from [4], which is trying to remove all traces of gic_arch_extn from the tree. As some maintainers are more responsive than others (understatement of the year...), I've decided to split it per sub-arch, and get it moving, at least partially.

This series addresses Exynos by converting its PM support to a stacked domain on top of the standard GIC.

Based on 4.0-rc1.

* From v4: [4]
- Extracted from the full series
- Rebased on 4.0-rc1

* From v3 [3]:
- Rebased on top of the patch working around hardcoded IRQ on OMAP4/5 [4]
- Fixed more iMX6 DTs (Stephan)
- Fixed Exynos4/5 DTs

* From v2 [2]:
- Addressed numerous comments from Thierry
- Merged bug fixes from Nishanth
- Merged bug fix from Stefan

* From v1 [1]:
- Rebased on 3.19-rc3
- Fixed a number of additional platforms
- Added crossbar conversion to stacked domains
- Merged bug fixes from Nishanth

[4]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/317531.html
[3]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315385.html
[2]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314041.html
[1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/307338.html

Marc Zyngier (2):
ARM: exynos4/5: convert pmu wakeup to stacked domains
DT: exynos: update PMU binding

  .../devicetree/bindings/arm/samsung/pmu.txt        |  17 +++
  arch/arm/boot/dts/exynos4.dtsi                     |   4 +
  arch/arm/boot/dts/exynos5250.dtsi                  |   4 +
  arch/arm/boot/dts/exynos5420.dtsi                  |   4 +
  arch/arm/mach-exynos/exynos.c                      |  14 +--
  arch/arm/mach-exynos/suspend.c                     | 122 +++++++++++++++++++--
  6 files changed, 146 insertions(+), 19 deletions(-)
Quoted 8 lines
Quoted 5 lines

I tested and verified S2R functionality on Exynos5250 based SMDK5250 board, and suspend-resume working fine. For testing on SMDK5250 you can add my tested-by.

Thanks. Will you or Kukjin get that merged directly?

OK, I'll take this series in Samsung tree.

Thanks,
Kukjin