irqchip: Move Exynos PM to use stacked domains
v6 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 v5: [5]
- Added a big fat warning when an old DT is detected (as requested by Jason)
- Added support for Exynos3250
- Allow interrupt affinity to be changed
* 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
[5]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325368.html
[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/exynos3250.dtsi | 6 +- 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 | 15 +-- arch/arm/mach-exynos/suspend.c | 139 ++++++++++++++++++--- 7 files changed, 164 insertions(+), 25 deletions(-)
Signature · 1 line
2.1.4
PATCH v6 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/exynos3250.dtsi | 6 +- 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 | 15 ++-- arch/arm/mach-exynos/suspend.c | 139 ++++++++++++++++++++++++++++++++++---- 6 files changed, 147 insertions(+), 25 deletions(-)
arch/arm/boot/dts/exynos3250.dtsi +5 -1
@@ -130,6 +130,9 @@ pmu_system_controller: system-controller at 10020000 { compatible = "samsung,exynos3250-pmu", "syscon"; reg = <0x10020000 0x4000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupt-parent = <&gic>; }; mipi_phy: video-phy at 10020710 {
@@ -183,7 +186,8 @@ rtc: rtc at 10070000 { compatible = "samsung,exynos3250-rtc"; reg = <0x10070000 0x100>; - interrupts = <0 73 0>, <0 74 0>; + interrupts = <0 41 0>, <0 42 0>; + interrupt-parent = <&pmu_system_controller>; status = "disabled"; };
arch/arm/boot/dts/exynos4.dtsi +4 -0
@@ -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
@@ -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
@@ -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 -10
@@ -166,16 +166,14 @@ 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 +184,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 +125 -14
183 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v6 2/2 DT: exynos: update PMU binding
In reply to Marc ZyngierDocument 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
@@ -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
Jason Cooper
Appliedv6 cover irqchip: Move Exynos PM to use stacked domains
In reply to Marc ZyngierMarc,
Quoted 45 lines · Marc Zyngier
This series is extracted from [4], which is trying to remove all traces of
gic_arch_extnfrom 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 v5: [5]
- Added a big fat warning when an old DT is detected (as requested by Jason)
- Added support for Exynos3250
- Allow interrupt affinity to be changed* 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[5]: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325368.html
[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.htmlMarc 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/exynos3250.dtsi | 6 +- 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 | 15 +-- arch/arm/mach-exynos/suspend.c | 139 ++++++++++++++++++--- 7 files changed, 164 insertions(+), 25 deletions(-)
Applied to irqchip/stacked-exynos to give the series some time in -next.
thx,
Jason.