LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/5] Add standby support for the recent mvebu SoCs
@ 2015-03-30 14:04 Gregory CLEMENT
  2015-03-30 14:04 ` [PATCH 1/5] ARM: mvebu: Use __init for the PM initialization functions Gregory CLEMENT
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2015-03-30 14:04 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory CLEMENT, Thomas Gleixner, linux-kernel
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai

Hi,

Until now only one Armada XP based board supported suspend to
ram. This suspend to ram mode was unusual because it involved shutting
down the SoC and relied on a PIC to wake up the system.

However, most of the recent mvebu SoCs can support the standby
mode. Unlike for the suspend to ram, nothing special have to be done
for these SoCs. In this mode the SoCs go in idle mode (but they remain
powered up) and the devices enter in suspend mode. The support itself
was added in the patch 2.

In order to wake-up the interrupt controller driver have been
updated. As in standby mode the interrupt controller is not shutdown,
any interrupt can be a wake-up source. So the MPIC (patch 4) and the
GIC (patch 3) now used the flags IRQCHIP_SKIP_SET_WAKE and
IRQCHIP_MASK_ON_SUSPEND.

A wake up source is supposed to work in suspend _and_ in standby mode
but for the mvebu SoCs, no interrupt can wake up the system. The last
patch warns the user about it.

The first patch is a clean-up found while working on this series

All the patch are independents either for building or for running.

Thanks,

Gregory


Gregory CLEMENT (5):
  ARM: mvebu: Use __init for the PM initialization functions
  ARM: mvebu: Add standby support
  ARM: mvebu: Allow using the GIC for wakeup in standby mode
  irqchip: armada-370-xp: Allow using wakeup source
  ARM: mvebu: Warn about the wake-ups sources not taken into account in
    suspend

 arch/arm/mach-mvebu/board-v7.c      |  7 +++++
 arch/arm/mach-mvebu/common.h        |  5 ++--
 arch/arm/mach-mvebu/pm-board.c      | 15 ++++++----
 arch/arm/mach-mvebu/pm.c            | 57 ++++++++++++++++++++++++++++++++-----
 drivers/irqchip/irq-armada-370-xp.c |  1 +
 5 files changed, 70 insertions(+), 15 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/5] ARM: mvebu: Use __init for the PM initialization functions
  2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
@ 2015-03-30 14:04 ` Gregory CLEMENT
  2015-03-30 14:04 ` [PATCH 2/5] ARM: mvebu: Add standby support Gregory CLEMENT
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2015-03-30 14:04 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory CLEMENT, Thomas Gleixner, linux-kernel
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai

mvebu_pm_init and mvebu_armada_xp_gp_pm_init are only called during
boot, so flag them with __init and save some memory.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/mach-mvebu/pm-board.c | 2 +-
 arch/arm/mach-mvebu/pm.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/pm-board.c b/arch/arm/mach-mvebu/pm-board.c
index 6dfd4ab97b2a..e56782ac9fbe 100644
--- a/arch/arm/mach-mvebu/pm-board.c
+++ b/arch/arm/mach-mvebu/pm-board.c
@@ -73,7 +73,7 @@ static void mvebu_armada_xp_gp_pm_enter(void __iomem *sdram_reg, u32 srcmd)
 		  [ackcmd] "r" (ackcmd), [gpio_ctrl] "r" (gpio_ctrl) : "r1");
 }
 
-static int mvebu_armada_xp_gp_pm_init(void)
+static int __init mvebu_armada_xp_gp_pm_init(void)
 {
 	struct device_node *np;
 	struct device_node *gpio_ctrl_np;
diff --git a/arch/arm/mach-mvebu/pm.c b/arch/arm/mach-mvebu/pm.c
index 6573a8f11f70..36f28db6e3a1 100644
--- a/arch/arm/mach-mvebu/pm.c
+++ b/arch/arm/mach-mvebu/pm.c
@@ -177,7 +177,7 @@ static const struct platform_suspend_ops mvebu_pm_ops = {
 	.valid = suspend_valid_only_mem,
 };
 
-int mvebu_pm_init(void (*board_pm_enter)(void __iomem *sdram_reg, u32 srcmd))
+int __init mvebu_pm_init(void (*board_pm_enter)(void __iomem *sdram_reg, u32 srcmd))
 {
 	struct device_node *np;
 	struct resource res;
-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/5] ARM: mvebu: Add standby support
  2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
  2015-03-30 14:04 ` [PATCH 1/5] ARM: mvebu: Use __init for the PM initialization functions Gregory CLEMENT
@ 2015-03-30 14:04 ` Gregory CLEMENT
  2015-03-30 14:04 ` [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode Gregory CLEMENT
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2015-03-30 14:04 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory CLEMENT, Thomas Gleixner, linux-kernel
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai

Until now only one Armada XP based board supported suspend to
ram. However most of the recent mvebu SoCs can support the standby
mode. Unlike for the suspend to ram, nothing special have to be done
for this SoC. This patch allow the system to use the standby mode on
Armada 370, 38x, 39x and XP SoCs. There is issues with the the Armada
375, and the support would be added (if possible) in a future patch.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/mach-mvebu/common.h   |  5 ++--
 arch/arm/mach-mvebu/pm-board.c | 13 ++++++----
 arch/arm/mach-mvebu/pm.c       | 56 ++++++++++++++++++++++++++++++++++++------
 3 files changed, 60 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
index 3e0aca1f288a..341d35d7185a 100644
--- a/arch/arm/mach-mvebu/common.h
+++ b/arch/arm/mach-mvebu/common.h
@@ -25,6 +25,7 @@ int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev);
 
 void __iomem *mvebu_get_scu_base(void);
 
-int mvebu_pm_init(void (*board_pm_enter)(void __iomem *sdram_reg, u32 srcmd));
-
+int mvebu_pm_suspend_init(void (*board_pm_enter)(void __iomem *sdram_reg,
+							u32 srcmd));
+void mvebu_pm_register_init(int (*board_pm_init)(void));
 #endif
diff --git a/arch/arm/mach-mvebu/pm-board.c b/arch/arm/mach-mvebu/pm-board.c
index e56782ac9fbe..f5aa9dfcc19d 100644
--- a/arch/arm/mach-mvebu/pm-board.c
+++ b/arch/arm/mach-mvebu/pm-board.c
@@ -79,9 +79,6 @@ static int __init mvebu_armada_xp_gp_pm_init(void)
 	struct device_node *gpio_ctrl_np;
 	int ret = 0, i;
 
-	if (!of_machine_is_compatible("marvell,axp-gp"))
-		return -ENODEV;
-
 	np = of_find_node_by_name(NULL, "pm_pic");
 	if (!np)
 		return -ENODEV;
@@ -131,11 +128,17 @@ static int __init mvebu_armada_xp_gp_pm_init(void)
 	if (!gpio_ctrl)
 		return -ENOMEM;
 
-	mvebu_pm_init(mvebu_armada_xp_gp_pm_enter);
+	mvebu_pm_suspend_init(mvebu_armada_xp_gp_pm_enter);
 
 out:
 	of_node_put(np);
 	return ret;
 }
 
-late_initcall(mvebu_armada_xp_gp_pm_init);
+int __init mvebu_armada_xp_gp_pm_register(void)
+{
+	if (of_machine_is_compatible("marvell,axp-gp"))
+		mvebu_pm_register_init(mvebu_armada_xp_gp_pm_init);
+	return 0;
+}
+arch_initcall(mvebu_armada_xp_gp_pm_register);
diff --git a/arch/arm/mach-mvebu/pm.c b/arch/arm/mach-mvebu/pm.c
index 36f28db6e3a1..547310230edd 100644
--- a/arch/arm/mach-mvebu/pm.c
+++ b/arch/arm/mach-mvebu/pm.c
@@ -34,6 +34,8 @@
 
 static void (*mvebu_board_pm_enter)(void __iomem *sdram_reg, u32 srcmd);
 static void __iomem *sdram_ctrl;
+static bool is_suspend_mem_available;
+static int (*mvebu_board_pm_init)(void);
 
 static int mvebu_pm_powerdown(unsigned long data)
 {
@@ -151,11 +153,8 @@ static void mvebu_pm_store_bootinfo(void)
 	writel(BOOT_MAGIC_LIST_END, store_addr);
 }
 
-static int mvebu_pm_enter(suspend_state_t state)
+static void mvebu_enter_suspend(void)
 {
-	if (state != PM_SUSPEND_MEM)
-		return -EINVAL;
-
 	cpu_pm_enter();
 
 	mvebu_pm_store_bootinfo();
@@ -168,16 +167,57 @@ static int mvebu_pm_enter(suspend_state_t state)
 	set_cpu_coherent();
 
 	cpu_pm_exit();
+}
 
+static int mvebu_pm_enter(suspend_state_t state)
+{
+	switch (state) {
+	case PM_SUSPEND_STANDBY:
+		cpu_do_idle();
+		break;
+	case PM_SUSPEND_MEM:
+		mvebu_enter_suspend();
+	default:
+		return -EINVAL;
+	}
 	return 0;
 }
 
+static int mvebu_pm_valid(suspend_state_t state)
+{
+	return ((state == PM_SUSPEND_STANDBY) ||
+		(is_suspend_mem_available && (state == PM_SUSPEND_MEM)));
+}
+
 static const struct platform_suspend_ops mvebu_pm_ops = {
 	.enter = mvebu_pm_enter,
-	.valid = suspend_valid_only_mem,
+	.valid = mvebu_pm_valid,
 };
 
-int __init mvebu_pm_init(void (*board_pm_enter)(void __iomem *sdram_reg, u32 srcmd))
+void __init mvebu_pm_register_init(int (*board_pm_init)(void))
+{
+	mvebu_board_pm_init = board_pm_init;
+}
+
+static int __init mvebu_pm_init(void)
+{
+
+	if (!of_machine_is_compatible("marvell,armadaxp") &&
+			!of_machine_is_compatible("marvell,armada370") &&
+			!of_machine_is_compatible("marvell,armada380") &&
+			!of_machine_is_compatible("marvell,armada390"))
+		return -ENODEV;
+
+	if (mvebu_board_pm_init)
+		if (mvebu_board_pm_init())
+			pr_warn("Registering suspend init for this board failed\n");
+	suspend_set_ops(&mvebu_pm_ops);
+
+	return 0;
+}
+
+int __init mvebu_pm_suspend_init(void (*board_pm_enter)(void __iomem *sdram_reg,
+								u32 srcmd))
 {
 	struct device_node *np;
 	struct resource res;
@@ -212,7 +252,9 @@ int __init mvebu_pm_init(void (*board_pm_enter)(void __iomem *sdram_reg, u32 src
 
 	mvebu_board_pm_enter = board_pm_enter;
 
-	suspend_set_ops(&mvebu_pm_ops);
+	is_suspend_mem_available = true;
 
 	return 0;
 }
+
+late_initcall(mvebu_pm_init);
-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode
  2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
  2015-03-30 14:04 ` [PATCH 1/5] ARM: mvebu: Use __init for the PM initialization functions Gregory CLEMENT
  2015-03-30 14:04 ` [PATCH 2/5] ARM: mvebu: Add standby support Gregory CLEMENT
@ 2015-03-30 14:04 ` Gregory CLEMENT
  2015-04-01  8:34   ` Marcin Wojtas
  2015-03-30 14:04 ` [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source Gregory CLEMENT
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2015-03-30 14:04 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory CLEMENT, Thomas Gleixner, linux-kernel
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai

On the Armada 375/38x/39x SoCs, in standby mode the SoC stay powered
and it is possible to wake-up from any interrupt sources. This patch
adds flag to the GIC irqchip driver to let linux know this.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/mach-mvebu/board-v7.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 89a139ed7d5b..61774279a66d 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -18,6 +18,7 @@
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
+#include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/clocksource.h>
 #include <linux/dma-mapping.h>
@@ -26,6 +27,7 @@
 #include <linux/signal.h>
 #include <linux/slab.h>
 #include <linux/irqchip.h>
+#include <linux/irqchip/arm-gic.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -129,6 +131,11 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
 
 static void __init mvebu_init_irq(void)
 {
+	if (of_machine_is_compatible("marvell,armada375") ||
+	    of_machine_is_compatible("marvell,armada380") ||
+	    of_machine_is_compatible("marvell,armada390"))
+		gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE |
+				      IRQCHIP_MASK_ON_SUSPEND);
 	irqchip_init();
 	mvebu_scu_enable();
 	coherency_init();
-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source
  2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
                   ` (2 preceding siblings ...)
  2015-03-30 14:04 ` [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode Gregory CLEMENT
@ 2015-03-30 14:04 ` Gregory CLEMENT
  2015-04-02 23:23   ` Jason Cooper
  2015-03-30 14:04 ` [PATCH 5/5] ARM: mvebu: Warn about the wake-ups sources not taken into account in suspend Gregory CLEMENT
  2015-04-01  9:02 ` [PATCH 0/5] Add standby support for the recent mvebu SoCs Marcin Wojtas
  5 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2015-03-30 14:04 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory CLEMENT, Thomas Gleixner, linux-kernel
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai

On the Armada 370/XP SoCs, in standby mode the SoC stay powered and it
is possible to wake-up from any interrupt sources. This patch adds
flag to the MPIC irqchip driver to let linux know this.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 drivers/irqchip/irq-armada-370-xp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 564ec69af5f0..ab186b344e14 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -290,6 +290,7 @@ static struct irq_chip armada_370_xp_irq_chip = {
 #ifdef CONFIG_SMP
 	.irq_set_affinity = armada_xp_set_affinity,
 #endif
+	.flags		= IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND,
 };
 
 static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 5/5] ARM: mvebu: Warn about the wake-ups sources not taken into account in suspend
  2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
                   ` (3 preceding siblings ...)
  2015-03-30 14:04 ` [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source Gregory CLEMENT
@ 2015-03-30 14:04 ` Gregory CLEMENT
  2015-04-01  9:02 ` [PATCH 0/5] Add standby support for the recent mvebu SoCs Marcin Wojtas
  5 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2015-03-30 14:04 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory CLEMENT, Thomas Gleixner, linux-kernel
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai

On the Armada 370/XP/38x/39x SoCs when the suspend to ram feature is
supported, the SoC is shutdown and will be wake up by an external
micro-controller, so there is no possibility to setup wake-up source
from Linux. However, in standby mode, as the SoC stay powered and it is
possible to wake-up from any interrupt sources. As when user decide to
setup a wake-up source, there is no way to know if they are wake-up
source from suspend or from standby, then we chose allowing to setup
all the interrupt as wake-up source.

The purpose of this patch is to inform the user that in suspend to ram
mode, the wake source won't be taken into consideration.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/mach-mvebu/pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-mvebu/pm.c b/arch/arm/mach-mvebu/pm.c
index 547310230edd..94966f1e4b14 100644
--- a/arch/arm/mach-mvebu/pm.c
+++ b/arch/arm/mach-mvebu/pm.c
@@ -176,6 +176,7 @@ static int mvebu_pm_enter(suspend_state_t state)
 		cpu_do_idle();
 		break;
 	case PM_SUSPEND_MEM:
+		pr_warn("None of the wakeup sources will be taken into account in suspend to ram\n");
 		mvebu_enter_suspend();
 	default:
 		return -EINVAL;
-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode
  2015-03-30 14:04 ` [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode Gregory CLEMENT
@ 2015-04-01  8:34   ` Marcin Wojtas
  2015-04-01  8:45     ` Gregory CLEMENT
  0 siblings, 1 reply; 17+ messages in thread
From: Marcin Wojtas @ 2015-04-01  8:34 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Gleixner, linux-kernel, Thomas Petazzoni, Boris BREZILLON,
	Tawfik Bayouk, Nadav Haklai, Lior Amsalem, Ezequiel Garcia,
	Maxime Ripard, linux-arm-kernel

Hi Gregory,

2015-03-30 16:04 GMT+02:00 Gregory CLEMENT <gregory.clement@free-electrons.com>:
> On the Armada 375/38x/39x SoCs, in standby mode the SoC stay powered
> and it is possible to wake-up from any interrupt sources. This patch
> adds flag to the GIC irqchip driver to let linux know this.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  arch/arm/mach-mvebu/board-v7.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
> index 89a139ed7d5b..61774279a66d 100644
> --- a/arch/arm/mach-mvebu/board-v7.c
> +++ b/arch/arm/mach-mvebu/board-v7.c
> @@ -18,6 +18,7 @@
>  #include <linux/of_address.h>
>  #include <linux/of_fdt.h>
>  #include <linux/of_platform.h>
> +#include <linux/irq.h>
>  #include <linux/io.h>
>  #include <linux/clocksource.h>
>  #include <linux/dma-mapping.h>
> @@ -26,6 +27,7 @@
>  #include <linux/signal.h>
>  #include <linux/slab.h>
>  #include <linux/irqchip.h>
> +#include <linux/irqchip/arm-gic.h>
>  #include <asm/hardware/cache-l2x0.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
> @@ -129,6 +131,11 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
>
>  static void __init mvebu_init_irq(void)
>  {
> +       if (of_machine_is_compatible("marvell,armada375") ||
> +           of_machine_is_compatible("marvell,armada380") ||
> +           of_machine_is_compatible("marvell,armada390"))
> +               gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE |
> +                                     IRQCHIP_MASK_ON_SUSPEND);

I'm afraid you the patchset may be incomplete:
arch/arm/mach-mvebu/board-v7.c:137:3: error: implicit declaration of
function 'gic_set_irqchip_flags'
[-Werror=implicit-function-declaration]

Best regards,
Marcin

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode
  2015-04-01  8:34   ` Marcin Wojtas
@ 2015-04-01  8:45     ` Gregory CLEMENT
  0 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2015-04-01  8:45 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Gleixner, linux-kernel, Thomas Petazzoni, Boris BREZILLON,
	Tawfik Bayouk, Nadav Haklai, Lior Amsalem, Ezequiel Garcia,
	Maxime Ripard, linux-arm-kernel

Hi Marcin,

On 01/04/2015 10:34, Marcin Wojtas wrote:
> Hi Gregory,
> 
> 2015-03-30 16:04 GMT+02:00 Gregory CLEMENT <gregory.clement@free-electrons.com>:
>> On the Armada 375/38x/39x SoCs, in standby mode the SoC stay powered
>> and it is possible to wake-up from any interrupt sources. This patch
>> adds flag to the GIC irqchip driver to let linux know this.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>>  arch/arm/mach-mvebu/board-v7.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
>> index 89a139ed7d5b..61774279a66d 100644
>> --- a/arch/arm/mach-mvebu/board-v7.c
>> +++ b/arch/arm/mach-mvebu/board-v7.c
>> @@ -18,6 +18,7 @@
>>  #include <linux/of_address.h>
>>  #include <linux/of_fdt.h>
>>  #include <linux/of_platform.h>
>> +#include <linux/irq.h>
>>  #include <linux/io.h>
>>  #include <linux/clocksource.h>
>>  #include <linux/dma-mapping.h>
>> @@ -26,6 +27,7 @@
>>  #include <linux/signal.h>
>>  #include <linux/slab.h>
>>  #include <linux/irqchip.h>
>> +#include <linux/irqchip/arm-gic.h>
>>  #include <asm/hardware/cache-l2x0.h>
>>  #include <asm/mach/arch.h>
>>  #include <asm/mach/map.h>
>> @@ -129,6 +131,11 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
>>
>>  static void __init mvebu_init_irq(void)
>>  {
>> +       if (of_machine_is_compatible("marvell,armada375") ||
>> +           of_machine_is_compatible("marvell,armada380") ||
>> +           of_machine_is_compatible("marvell,armada390"))
>> +               gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE |
>> +                                     IRQCHIP_MASK_ON_SUSPEND);
> 
> I'm afraid you the patchset may be incomplete:
> arch/arm/mach-mvebu/board-v7.c:137:3: error: implicit declaration of
> function 'gic_set_irqchip_flags'
> [-Werror=implicit-function-declaration]

Actually I forgot to speak about the dependency.

This patch depends on the commit "irqchip: gic: Add an entry point to set up irqchip flags"
which is already in the irqchip branch and will be part of 4.1.

So in case it would be ok to merge it in 4.1 (but I doubt it it will be the case), then
this patch should be taken by the irqchip subsystem to resolve this dependency. I checked
that it should not conflict with the mvebu patches.

Thanks,

Gregory


> 
> Best regards,
> Marcin
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs
  2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
                   ` (4 preceding siblings ...)
  2015-03-30 14:04 ` [PATCH 5/5] ARM: mvebu: Warn about the wake-ups sources not taken into account in suspend Gregory CLEMENT
@ 2015-04-01  9:02 ` Marcin Wojtas
  2015-04-01  9:18   ` Thomas Petazzoni
  2015-04-01  9:21   ` Gregory CLEMENT
  5 siblings, 2 replies; 17+ messages in thread
From: Marcin Wojtas @ 2015-04-01  9:02 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Gleixner, linux-kernel, Thomas Petazzoni, Boris BREZILLON,
	Tawfik Bayouk, Nadav Haklai, Lior Amsalem, Ezequiel Garcia,
	Maxime Ripard, linux-arm-kernel

Hi Gregory,

When I run standby on A385 I get following error:
root@localhost:~# echo standby > /sys/power/state
[  122.889266] PM: System core suspend callback
mvebu_mbus_suspend+0x0/0xf4 failed.

Did you see this issue in your setup?

Best regards,
Marcin

2015-03-30 16:04 GMT+02:00 Gregory CLEMENT <gregory.clement@free-electrons.com>:
> Hi,
>
> Until now only one Armada XP based board supported suspend to
> ram. This suspend to ram mode was unusual because it involved shutting
> down the SoC and relied on a PIC to wake up the system.
>
> However, most of the recent mvebu SoCs can support the standby
> mode. Unlike for the suspend to ram, nothing special have to be done
> for these SoCs. In this mode the SoCs go in idle mode (but they remain
> powered up) and the devices enter in suspend mode. The support itself
> was added in the patch 2.
>
> In order to wake-up the interrupt controller driver have been
> updated. As in standby mode the interrupt controller is not shutdown,
> any interrupt can be a wake-up source. So the MPIC (patch 4) and the
> GIC (patch 3) now used the flags IRQCHIP_SKIP_SET_WAKE and
> IRQCHIP_MASK_ON_SUSPEND.
>
> A wake up source is supposed to work in suspend _and_ in standby mode
> but for the mvebu SoCs, no interrupt can wake up the system. The last
> patch warns the user about it.
>
> The first patch is a clean-up found while working on this series
>
> All the patch are independents either for building or for running.
>
> Thanks,
>
> Gregory
>
>
> Gregory CLEMENT (5):
>   ARM: mvebu: Use __init for the PM initialization functions
>   ARM: mvebu: Add standby support
>   ARM: mvebu: Allow using the GIC for wakeup in standby mode
>   irqchip: armada-370-xp: Allow using wakeup source
>   ARM: mvebu: Warn about the wake-ups sources not taken into account in
>     suspend
>
>  arch/arm/mach-mvebu/board-v7.c      |  7 +++++
>  arch/arm/mach-mvebu/common.h        |  5 ++--
>  arch/arm/mach-mvebu/pm-board.c      | 15 ++++++----
>  arch/arm/mach-mvebu/pm.c            | 57 ++++++++++++++++++++++++++++++++-----
>  drivers/irqchip/irq-armada-370-xp.c |  1 +
>  5 files changed, 70 insertions(+), 15 deletions(-)
>
> --
> 2.1.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs
  2015-04-01  9:02 ` [PATCH 0/5] Add standby support for the recent mvebu SoCs Marcin Wojtas
@ 2015-04-01  9:18   ` Thomas Petazzoni
  2015-04-01  9:21   ` Gregory CLEMENT
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2015-04-01  9:18 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Gregory CLEMENT, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Gleixner, linux-kernel,
	Boris BREZILLON, Tawfik Bayouk, Nadav Haklai, Lior Amsalem,
	Ezequiel Garcia, Maxime Ripard, linux-arm-kernel

Dear Marcin Wojtas,

On Wed, 1 Apr 2015 11:02:47 +0200, Marcin Wojtas wrote:

> When I run standby on A385 I get following error:
> root@localhost:~# echo standby > /sys/power/state
> [  122.889266] PM: System core suspend callback
> mvebu_mbus_suspend+0x0/0xf4 failed.
> 
> Did you see this issue in your setup?

You need to change your DT to include an additional set of registers
for the MBus node.

This is something that we probably need to change in the mvebu-mbus
driver, I remember we discussed this with Greg.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs
  2015-04-01  9:02 ` [PATCH 0/5] Add standby support for the recent mvebu SoCs Marcin Wojtas
  2015-04-01  9:18   ` Thomas Petazzoni
@ 2015-04-01  9:21   ` Gregory CLEMENT
  2015-04-01  9:39     ` Marcin Wojtas
  1 sibling, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2015-04-01  9:21 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Gleixner, linux-kernel, Thomas Petazzoni, Boris BREZILLON,
	Tawfik Bayouk, Nadav Haklai, Lior Amsalem, Ezequiel Garcia,
	Maxime Ripard, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 2894 bytes --]

Hi Marcin,

On 01/04/2015 11:02, Marcin Wojtas wrote:
> Hi Gregory,
> 
> When I run standby on A385 I get following error:
> root@localhost:~# echo standby > /sys/power/state
> [  122.889266] PM: System core suspend callback
> mvebu_mbus_suspend+0x0/0xf4 failed.
> 
> Did you see this issue in your setup?

Yes the mbus driver for the Armada 38x must be updated. As Thomas
worked on it I didn't put it in the series.

I have just create the patch needed you can try it, and I will
add it in the next version of the series.

Thanks,

Gregory


> 
> Best regards,
> Marcin
> 
> 2015-03-30 16:04 GMT+02:00 Gregory CLEMENT <gregory.clement@free-electrons.com>:
>> Hi,
>>
>> Until now only one Armada XP based board supported suspend to
>> ram. This suspend to ram mode was unusual because it involved shutting
>> down the SoC and relied on a PIC to wake up the system.
>>
>> However, most of the recent mvebu SoCs can support the standby
>> mode. Unlike for the suspend to ram, nothing special have to be done
>> for these SoCs. In this mode the SoCs go in idle mode (but they remain
>> powered up) and the devices enter in suspend mode. The support itself
>> was added in the patch 2.
>>
>> In order to wake-up the interrupt controller driver have been
>> updated. As in standby mode the interrupt controller is not shutdown,
>> any interrupt can be a wake-up source. So the MPIC (patch 4) and the
>> GIC (patch 3) now used the flags IRQCHIP_SKIP_SET_WAKE and
>> IRQCHIP_MASK_ON_SUSPEND.
>>
>> A wake up source is supposed to work in suspend _and_ in standby mode
>> but for the mvebu SoCs, no interrupt can wake up the system. The last
>> patch warns the user about it.
>>
>> The first patch is a clean-up found while working on this series
>>
>> All the patch are independents either for building or for running.
>>
>> Thanks,
>>
>> Gregory
>>
>>
>> Gregory CLEMENT (5):
>>   ARM: mvebu: Use __init for the PM initialization functions
>>   ARM: mvebu: Add standby support
>>   ARM: mvebu: Allow using the GIC for wakeup in standby mode
>>   irqchip: armada-370-xp: Allow using wakeup source
>>   ARM: mvebu: Warn about the wake-ups sources not taken into account in
>>     suspend
>>
>>  arch/arm/mach-mvebu/board-v7.c      |  7 +++++
>>  arch/arm/mach-mvebu/common.h        |  5 ++--
>>  arch/arm/mach-mvebu/pm-board.c      | 15 ++++++----
>>  arch/arm/mach-mvebu/pm.c            | 57 ++++++++++++++++++++++++++++++++-----
>>  drivers/irqchip/irq-armada-370-xp.c |  1 +
>>  5 files changed, 70 insertions(+), 15 deletions(-)
>>
>> --
>> 2.1.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ARM-mvebu-adjust-mbus-controller-description-on-Arma.patch --]
[-- Type: text/x-diff; name="0001-ARM-mvebu-adjust-mbus-controller-description-on-Arma.patch", Size: 1238 bytes --]

From 24f3e86d1abcecec0595cdf7550f228f994f3426 Mon Sep 17 00:00:00 2001
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
Date: Wed, 1 Apr 2015 11:16:56 +0200
Subject: [PATCH] ARM: mvebu: adjust mbus controller description on Armada 38x

AS for the Armada 370 and the Armada XP, in order to support
suspend(or standby)/resume on Armada 38x, an additional set of
registers need to be described at the MBus controller level. This
commit therefore adjusts the Device Tree of the Armada 38x SoC to
include those registers in the MBus controller description.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/boot/dts/armada-38x.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 1dff30a81e24..900f7f7f407f 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -365,7 +365,8 @@
 
 			mbusc: mbus-controller@20000 {
 				compatible = "marvell,mbus-controller";
-				reg = <0x20000 0x100>, <0x20180 0x20>;
+				reg = <0x20000 0x100>, <0x20180 0x20>,
+				      <0x20250 0x8>;
 			};
 
 			mpic: interrupt-controller@20000 {
-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs
  2015-04-01  9:21   ` Gregory CLEMENT
@ 2015-04-01  9:39     ` Marcin Wojtas
  0 siblings, 0 replies; 17+ messages in thread
From: Marcin Wojtas @ 2015-04-01  9:39 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Gleixner, linux-kernel, Thomas Petazzoni, Boris BREZILLON,
	Tawfik Bayouk, Nadav Haklai, Lior Amsalem, Ezequiel Garcia,
	Maxime Ripard, linux-arm-kernel

Thanks, it heleped.

Best regards,
Marcin

2015-04-01 11:21 GMT+02:00 Gregory CLEMENT <gregory.clement@free-electrons.com>:
> Hi Marcin,
>
> On 01/04/2015 11:02, Marcin Wojtas wrote:
>> Hi Gregory,
>>
>> When I run standby on A385 I get following error:
>> root@localhost:~# echo standby > /sys/power/state
>> [  122.889266] PM: System core suspend callback
>> mvebu_mbus_suspend+0x0/0xf4 failed.
>>
>> Did you see this issue in your setup?
>
> Yes the mbus driver for the Armada 38x must be updated. As Thomas
> worked on it I didn't put it in the series.
>
> I have just create the patch needed you can try it, and I will
> add it in the next version of the series.
>
> Thanks,
>
> Gregory
>
>
>>
>> Best regards,
>> Marcin
>>
>> 2015-03-30 16:04 GMT+02:00 Gregory CLEMENT <gregory.clement@free-electrons.com>:
>>> Hi,
>>>
>>> Until now only one Armada XP based board supported suspend to
>>> ram. This suspend to ram mode was unusual because it involved shutting
>>> down the SoC and relied on a PIC to wake up the system.
>>>
>>> However, most of the recent mvebu SoCs can support the standby
>>> mode. Unlike for the suspend to ram, nothing special have to be done
>>> for these SoCs. In this mode the SoCs go in idle mode (but they remain
>>> powered up) and the devices enter in suspend mode. The support itself
>>> was added in the patch 2.
>>>
>>> In order to wake-up the interrupt controller driver have been
>>> updated. As in standby mode the interrupt controller is not shutdown,
>>> any interrupt can be a wake-up source. So the MPIC (patch 4) and the
>>> GIC (patch 3) now used the flags IRQCHIP_SKIP_SET_WAKE and
>>> IRQCHIP_MASK_ON_SUSPEND.
>>>
>>> A wake up source is supposed to work in suspend _and_ in standby mode
>>> but for the mvebu SoCs, no interrupt can wake up the system. The last
>>> patch warns the user about it.
>>>
>>> The first patch is a clean-up found while working on this series
>>>
>>> All the patch are independents either for building or for running.
>>>
>>> Thanks,
>>>
>>> Gregory
>>>
>>>
>>> Gregory CLEMENT (5):
>>>   ARM: mvebu: Use __init for the PM initialization functions
>>>   ARM: mvebu: Add standby support
>>>   ARM: mvebu: Allow using the GIC for wakeup in standby mode
>>>   irqchip: armada-370-xp: Allow using wakeup source
>>>   ARM: mvebu: Warn about the wake-ups sources not taken into account in
>>>     suspend
>>>
>>>  arch/arm/mach-mvebu/board-v7.c      |  7 +++++
>>>  arch/arm/mach-mvebu/common.h        |  5 ++--
>>>  arch/arm/mach-mvebu/pm-board.c      | 15 ++++++----
>>>  arch/arm/mach-mvebu/pm.c            | 57 ++++++++++++++++++++++++++++++++-----
>>>  drivers/irqchip/irq-armada-370-xp.c |  1 +
>>>  5 files changed, 70 insertions(+), 15 deletions(-)
>>>
>>> --
>>> 2.1.0
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel@lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source
  2015-03-30 14:04 ` [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source Gregory CLEMENT
@ 2015-04-02 23:23   ` Jason Cooper
  2015-04-03  7:17     ` Gregory CLEMENT
  0 siblings, 1 reply; 17+ messages in thread
From: Jason Cooper @ 2015-04-02 23:23 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Gleixner,
	linux-kernel, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai

On Mon, Mar 30, 2015 at 04:04:37PM +0200, Gregory CLEMENT wrote:
> On the Armada 370/XP SoCs, in standby mode the SoC stay powered and it
> is possible to wake-up from any interrupt sources. This patch adds
> flag to the MPIC irqchip driver to let linux know this.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  drivers/irqchip/irq-armada-370-xp.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to irqchip/mvebu

thx,

Jason.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source
  2015-04-02 23:23   ` Jason Cooper
@ 2015-04-03  7:17     ` Gregory CLEMENT
  2015-04-03 14:29       ` Jason Cooper
  0 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2015-04-03  7:17 UTC (permalink / raw)
  To: Jason Cooper
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Gleixner,
	linux-kernel, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai

Hi Jason,

On 03/04/2015 01:23, Jason Cooper wrote:
> On Mon, Mar 30, 2015 at 04:04:37PM +0200, Gregory CLEMENT wrote:
>> On the Armada 370/XP SoCs, in standby mode the SoC stay powered and it
>> is possible to wake-up from any interrupt sources. This patch adds
>> flag to the MPIC irqchip driver to let linux know this.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>>  drivers/irqchip/irq-armada-370-xp.c | 1 +
>>  1 file changed, 1 insertion(+)
> 
> Applied to irqchip/mvebu

Thanks!

Do you agree to take also the patch 3?

It modifies a file in mach-mvebu (board-v7.c) but it depends on a patch
located in irqchip: "irqchip: gic: Add an entry point to set up irqchip flags"


Thanks,

Gregory


> 
> thx,
> 
> Jason.
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source
  2015-04-03  7:17     ` Gregory CLEMENT
@ 2015-04-03 14:29       ` Jason Cooper
  2015-04-03 15:38         ` Gregory CLEMENT
  0 siblings, 1 reply; 17+ messages in thread
From: Jason Cooper @ 2015-04-03 14:29 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Gleixner,
	linux-kernel, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai

On Fri, Apr 03, 2015 at 09:17:55AM +0200, Gregory CLEMENT wrote:
> Hi Jason,
> 
> On 03/04/2015 01:23, Jason Cooper wrote:
> > On Mon, Mar 30, 2015 at 04:04:37PM +0200, Gregory CLEMENT wrote:
> >> On the Armada 370/XP SoCs, in standby mode the SoC stay powered and it
> >> is possible to wake-up from any interrupt sources. This patch adds
> >> flag to the MPIC irqchip driver to let linux know this.
> >>
> >> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >> ---
> >>  drivers/irqchip/irq-armada-370-xp.c | 1 +
> >>  1 file changed, 1 insertion(+)
> > 
> > Applied to irqchip/mvebu
> 
> Thanks!
> 
> Do you agree to take also the patch 3?

hmmm...

> It modifies a file in mach-mvebu (board-v7.c) but it depends on a patch
> located in irqchip: "irqchip: gic: Add an entry point to set up irqchip flags"

Yeah, I saw that.  Do you forsee any merge conflicts with mvebu?  The reason I
ask is that it looks like I'm going to be sending directly to Linus this
cycle.  I'd really prefer to hold off a cycle on that patch.  I'm not
100% certain my second PR (stacked domain/DT break) is going to get
accepted.  Which is what this patch depends on.

thoughts?

thx,

Jason.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source
  2015-04-03 14:29       ` Jason Cooper
@ 2015-04-03 15:38         ` Gregory CLEMENT
  2015-04-03 16:04           ` Jason Cooper
  0 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2015-04-03 15:38 UTC (permalink / raw)
  To: Jason Cooper
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Gleixner,
	linux-kernel, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai

On 03/04/2015 16:29, Jason Cooper wrote:
> On Fri, Apr 03, 2015 at 09:17:55AM +0200, Gregory CLEMENT wrote:
>> Hi Jason,
>>
>> On 03/04/2015 01:23, Jason Cooper wrote:
>>> On Mon, Mar 30, 2015 at 04:04:37PM +0200, Gregory CLEMENT wrote:
>>>> On the Armada 370/XP SoCs, in standby mode the SoC stay powered and it
>>>> is possible to wake-up from any interrupt sources. This patch adds
>>>> flag to the MPIC irqchip driver to let linux know this.
>>>>
>>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>>> ---
>>>>  drivers/irqchip/irq-armada-370-xp.c | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>
>>> Applied to irqchip/mvebu
>>
>> Thanks!
>>
>> Do you agree to take also the patch 3?
> 
> hmmm...
> 
>> It modifies a file in mach-mvebu (board-v7.c) but it depends on a patch
>> located in irqchip: "irqchip: gic: Add an entry point to set up irqchip flags"
> 
> Yeah, I saw that.  Do you forsee any merge conflicts with mvebu?  The reason I

There is only two patches which modify the same file, but they don't touch the
same chunk. So the only impact would be the line numbers which could not be
different. In order to be sure I've just tried to apply first this patch and then
these 2 other ones: there was no problem at all.

> ask is that it looks like I'm going to be sending directly to Linus this
> cycle.  I'd really prefer to hold off a cycle on that patch.  I'm not
> 100% certain my second PR (stacked domain/DT break) is going to get
> accepted.  Which is what this patch depends on.
> 
> thoughts?

This patch can wait if needed as this patch alone is not enough to to be able
to use standby and I am not sure at all that I the other part of the series will
be merged in 4.1.


Thanks,

Gregory

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source
  2015-04-03 15:38         ` Gregory CLEMENT
@ 2015-04-03 16:04           ` Jason Cooper
  0 siblings, 0 replies; 17+ messages in thread
From: Jason Cooper @ 2015-04-03 16:04 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Gleixner,
	linux-kernel, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai

On Fri, Apr 03, 2015 at 05:38:43PM +0200, Gregory CLEMENT wrote:
> On 03/04/2015 16:29, Jason Cooper wrote:
> > On Fri, Apr 03, 2015 at 09:17:55AM +0200, Gregory CLEMENT wrote:
> >> Hi Jason,
> >>
> >> On 03/04/2015 01:23, Jason Cooper wrote:
> >>> On Mon, Mar 30, 2015 at 04:04:37PM +0200, Gregory CLEMENT wrote:
> >>>> On the Armada 370/XP SoCs, in standby mode the SoC stay powered and it
> >>>> is possible to wake-up from any interrupt sources. This patch adds
> >>>> flag to the MPIC irqchip driver to let linux know this.
> >>>>
> >>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >>>> ---
> >>>>  drivers/irqchip/irq-armada-370-xp.c | 1 +
> >>>>  1 file changed, 1 insertion(+)
> >>>
> >>> Applied to irqchip/mvebu
> >>
> >> Thanks!
> >>
> >> Do you agree to take also the patch 3?
> > 
> > hmmm...
> > 
> >> It modifies a file in mach-mvebu (board-v7.c) but it depends on a patch
> >> located in irqchip: "irqchip: gic: Add an entry point to set up irqchip flags"
> > 
> > Yeah, I saw that.  Do you forsee any merge conflicts with mvebu?  The reason I
> 
> There is only two patches which modify the same file, but they don't touch the
> same chunk. So the only impact would be the line numbers which could not be
> different. In order to be sure I've just tried to apply first this patch and then
> these 2 other ones: there was no problem at all.
> 
> > ask is that it looks like I'm going to be sending directly to Linus this
> > cycle.  I'd really prefer to hold off a cycle on that patch.  I'm not
> > 100% certain my second PR (stacked domain/DT break) is going to get
> > accepted.  Which is what this patch depends on.
> > 
> > thoughts?
> 
> This patch can wait if needed as this patch alone is not enough to to be able
> to use standby and I am not sure at all that I the other part of the series will
> be merged in 4.1.

Ok, let's hold off then.  btw - I just ran through Thomas' slides on DT
ABI/fantasy.  Very good work.  I hope to see the video some day.  :-)

thx,

Jason.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-04-03 16:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 14:04 [PATCH 0/5] Add standby support for the recent mvebu SoCs Gregory CLEMENT
2015-03-30 14:04 ` [PATCH 1/5] ARM: mvebu: Use __init for the PM initialization functions Gregory CLEMENT
2015-03-30 14:04 ` [PATCH 2/5] ARM: mvebu: Add standby support Gregory CLEMENT
2015-03-30 14:04 ` [PATCH 3/5] ARM: mvebu: Allow using the GIC for wakeup in standby mode Gregory CLEMENT
2015-04-01  8:34   ` Marcin Wojtas
2015-04-01  8:45     ` Gregory CLEMENT
2015-03-30 14:04 ` [PATCH 4/5] irqchip: armada-370-xp: Allow using wakeup source Gregory CLEMENT
2015-04-02 23:23   ` Jason Cooper
2015-04-03  7:17     ` Gregory CLEMENT
2015-04-03 14:29       ` Jason Cooper
2015-04-03 15:38         ` Gregory CLEMENT
2015-04-03 16:04           ` Jason Cooper
2015-03-30 14:04 ` [PATCH 5/5] ARM: mvebu: Warn about the wake-ups sources not taken into account in suspend Gregory CLEMENT
2015-04-01  9:02 ` [PATCH 0/5] Add standby support for the recent mvebu SoCs Marcin Wojtas
2015-04-01  9:18   ` Thomas Petazzoni
2015-04-01  9:21   ` Gregory CLEMENT
2015-04-01  9:39     ` Marcin Wojtas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).