public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: pankaj.dubey@samsung•com (Pankaj Dubey)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 15/21] ARM: exynos4/5: convert pmu wakeup to stacked domains
Date: Tue, 20 Jan 2015 13:12:53 +0530	[thread overview]
Message-ID: <54BE06FD.2020702@samsung.com> (raw)
In-Reply-To: <1421660655-21394-16-git-send-email-marc.zyngier@arm.com>

Hi Marc,

On Monday 19 January 2015 03:14 PM, Marc Zyngier wrote:
> 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.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm•com>
> ---

I tested this patch series on SMDK5250 board.

With the addition of "#interrupt-cells = <3>;"in PMU device node S2R is 
working on Exynos5250 based SMDK board.

>   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(-)
>
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index b8168f1..0e7d74e 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -141,6 +141,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 {
> @@ -253,6 +256,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";
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index 0a229fc..1dc5f6b 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -194,6 +194,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 {
> @@ -230,6 +233,7 @@
>   	rtc: rtc at 101E0000 {
>   		clocks = <&clock CLK_RTC>;
>   		clock-names = "rtc";
> +		interrupt-parent = <&pmu_system_controller>;
>   		status = "disabled";
>   	};
>
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 517e50f..35ecd36 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -309,6 +309,7 @@
>   	rtc: rtc at 101E0000 {
>   		clocks = <&clock CLK_RTC>;
>   		clock-names = "rtc";
> +		interrupt-parent = <&pmu_system_controller>;
>   		status = "disabled";
>   	};
>
> @@ -748,6 +749,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 {
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index c13d083..e417fdc 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -175,16 +175,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" },

As I know Exynos3250, S2R support has been added in kgene/for-next and 
should work as expected so we may need to do update "exynos_wkup_irq" 
for exynos3250 and remove it from this list, so that it's S2R should not 
break. I am adding concern engineer (+cc: Chanwoo Choi) in the loop.

> -	{ .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*/ },
>   };
>

Thanks,
Pankaj Dubey

  reply	other threads:[~2015-01-20  7:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  9:43 [PATCH v4 00/21] irqchip: gic: killing gic_arch_extn and co, slowly Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 01/21] ARM: tegra: irq: nuke leftovers from non-DT support Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 02/21] irqchip: tegra: add DT-based support for legacy interrupt controller Marc Zyngier
2015-01-20  7:51   ` Peter De Schrijver
2015-01-19  9:43 ` [PATCH v4 03/21] ARM: tegra: skip gic_arch_extn setup if DT has a LIC node Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 04/21] ARM: tegra: update DTs to expose legacy interrupt controller Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 05/21] DT: tegra: add binding for the " Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 06/21] ARM: tegra: remove old LIC support Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 07/21] genirq: Add irqchip_set_wake_parent Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 08/21] irqchip: crossbar: convert dra7 crossbar to stacked domains Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 09/21] DT: update ti,irq-crossbar binding Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 10/21] irqchip: GIC: get rid of routable domain Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 11/21] DT: arm,gic: kill arm,routable-irqs Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 12/21] DT: omap4/5: add binding for the wake-up generator Marc Zyngier
2015-01-21 16:26   ` Tony Lindgren
2015-01-19  9:44 ` [PATCH v4 13/21] ARM: omap: convert wakeupgen to stacked domains Marc Zyngier
2015-01-21 16:30   ` Tony Lindgren
2015-01-21 17:22     ` Marc Zyngier
2015-01-21 18:36       ` Tony Lindgren
2015-01-21 20:12         ` santosh shilimkar
2015-01-21 20:43           ` Tony Lindgren
2015-01-21 21:28             ` santosh shilimkar
2015-01-21 21:37               ` Tony Lindgren
2015-01-19  9:44 ` [PATCH v4 14/21] ARM: imx6: convert GPC " Marc Zyngier
2015-01-19 10:47   ` Lucas Stach
2015-01-19 11:12     ` Marc Zyngier
2015-01-20 11:19   ` Shawn Guo
2015-01-19  9:44 ` [PATCH v4 15/21] ARM: exynos4/5: convert pmu wakeup " Marc Zyngier
2015-01-20  7:42   ` Pankaj Dubey [this message]
2015-01-20  9:43     ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 16/21] DT: exynos: update PMU binding Marc Zyngier
2015-01-20  7:47   ` Pankaj Dubey
2015-01-19  9:44 ` [PATCH v4 17/21] irqchip: gic: add an entry point to set up irqchip flags Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 18/21] ARM: shmobile: remove use of gic_arch_extn.irq_set_wake Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 19/21] ARM: ux500: switch from gic_arch_extn to gic_set_irqchip_flags Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 20/21] ARM: zynq: " Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 21/21] irqchip: gic: Drop support for gic_arch_extn Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54BE06FD.2020702@samsung.com \
    --to=pankaj.dubey@samsung$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox