All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: armada-37xx: change suspend/resume time
@ 2019-01-08 16:28 Miquel Raynal
  2019-01-11  8:56 ` Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Miquel Raynal @ 2019-01-08 16:28 UTC (permalink / raw)
  To: Gregory Clement, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Linus Walleij
  Cc: devicetree, Antoine Tenart, Maxime Chevallier, Thomas Petazzoni,
	Nadav Haklai, linux-gpio, Miquel Raynal

Armada 3700 PCIe IP relies on the pinctrl IP managed by this
driver. For reasons related to the PCI core's organization when
suspending/resuming, PCI host controller drivers must reconfigure
their register at suspend_noirq()/resume_noirq() which happens after
suspend()/suspend_late() and before resume_early()/resume().

In the current state, after resuming from a suspend to RAM cycle the
PCIe IP is reconfigured before the pinctrl one which produces an
interrupt storm. The solution to support PCIe resume operation is to
change the "priority" of this pinctrl driver PM callbacks to
"_noirq()".

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 4b9f2cf94431..6462d3ca7ceb 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -1107,8 +1107,8 @@ static int armada_3700_pinctrl_resume(struct device *dev)
  * to other IO drivers.
  */
 static const struct dev_pm_ops armada_3700_pinctrl_pm_ops = {
-	.suspend_late = armada_3700_pinctrl_suspend,
-	.resume_early = armada_3700_pinctrl_resume,
+	.suspend_noirq = armada_3700_pinctrl_suspend,
+	.resume_noirq = armada_3700_pinctrl_resume,
 };
 
 #define PINCTRL_ARMADA_37XX_DEV_PM_OPS (&armada_3700_pinctrl_pm_ops)
-- 
2.19.1

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

* Re: [PATCH] pinctrl: armada-37xx: change suspend/resume time
  2019-01-08 16:28 [PATCH] pinctrl: armada-37xx: change suspend/resume time Miquel Raynal
@ 2019-01-11  8:56 ` Linus Walleij
  2019-01-18 14:20 ` Gregory CLEMENT
  2019-01-21 13:13 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-01-11  8:56 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Gregory Clement, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Antoine Tenart, Maxime Chevallier, Thomas Petazzoni,
	Nadav Haklai, open list:GPIO SUBSYSTEM

On Tue, Jan 8, 2019 at 5:28 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Armada 3700 PCIe IP relies on the pinctrl IP managed by this
> driver. For reasons related to the PCI core's organization when
> suspending/resuming, PCI host controller drivers must reconfigure
> their register at suspend_noirq()/resume_noirq() which happens after
> suspend()/suspend_late() and before resume_early()/resume().
>
> In the current state, after resuming from a suspend to RAM cycle the
> PCIe IP is reconfigured before the pinctrl one which produces an
> interrupt storm. The solution to support PCIe resume operation is to
> change the "priority" of this pinctrl driver PM callbacks to
> "_noirq()".
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

I suppose this patch requires the three other patches I just applied
for PCIe.

Would be nice to have Gregory's ACK on this patch before I apply
it?

Yours,
Linus Walleij

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

* Re: [PATCH] pinctrl: armada-37xx: change suspend/resume time
  2019-01-08 16:28 [PATCH] pinctrl: armada-37xx: change suspend/resume time Miquel Raynal
  2019-01-11  8:56 ` Linus Walleij
@ 2019-01-18 14:20 ` Gregory CLEMENT
  2019-01-21 13:13 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Gregory CLEMENT @ 2019-01-18 14:20 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Linus Walleij,
	devicetree, Antoine Tenart, Maxime Chevallier, Thomas Petazzoni,
	Nadav Haklai, linux-gpio

Hi Miquel,
 
 On mar., janv. 08 2019, Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Armada 3700 PCIe IP relies on the pinctrl IP managed by this
> driver. For reasons related to the PCI core's organization when
> suspending/resuming, PCI host controller drivers must reconfigure
> their register at suspend_noirq()/resume_noirq() which happens after
> suspend()/suspend_late() and before resume_early()/resume().
>
> In the current state, after resuming from a suspend to RAM cycle the
> PCIe IP is reconfigured before the pinctrl one which produces an
> interrupt storm. The solution to support PCIe resume operation is to
> change the "priority" of this pinctrl driver PM callbacks to
> "_noirq()".
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>

Thanks,

Gregory

> ---
>  drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> index 4b9f2cf94431..6462d3ca7ceb 100644
> --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> @@ -1107,8 +1107,8 @@ static int armada_3700_pinctrl_resume(struct device *dev)
>   * to other IO drivers.
>   */
>  static const struct dev_pm_ops armada_3700_pinctrl_pm_ops = {
> -	.suspend_late = armada_3700_pinctrl_suspend,
> -	.resume_early = armada_3700_pinctrl_resume,
> +	.suspend_noirq = armada_3700_pinctrl_suspend,
> +	.resume_noirq = armada_3700_pinctrl_resume,
>  };
>  
>  #define PINCTRL_ARMADA_37XX_DEV_PM_OPS (&armada_3700_pinctrl_pm_ops)
> -- 
> 2.19.1
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

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

* Re: [PATCH] pinctrl: armada-37xx: change suspend/resume time
  2019-01-08 16:28 [PATCH] pinctrl: armada-37xx: change suspend/resume time Miquel Raynal
  2019-01-11  8:56 ` Linus Walleij
  2019-01-18 14:20 ` Gregory CLEMENT
@ 2019-01-21 13:13 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-01-21 13:13 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Gregory Clement, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Antoine Tenart, Maxime Chevallier, Thomas Petazzoni,
	Nadav Haklai, open list:GPIO SUBSYSTEM

On Tue, Jan 8, 2019 at 5:28 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Armada 3700 PCIe IP relies on the pinctrl IP managed by this
> driver. For reasons related to the PCI core's organization when
> suspending/resuming, PCI host controller drivers must reconfigure
> their register at suspend_noirq()/resume_noirq() which happens after
> suspend()/suspend_late() and before resume_early()/resume().
>
> In the current state, after resuming from a suspend to RAM cycle the
> PCIe IP is reconfigured before the pinctrl one which produces an
> interrupt storm. The solution to support PCIe resume operation is to
> change the "priority" of this pinctrl driver PM callbacks to
> "_noirq()".
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Patch applied with Gregory's ACK!

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-01-21 13:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08 16:28 [PATCH] pinctrl: armada-37xx: change suspend/resume time Miquel Raynal
2019-01-11  8:56 ` Linus Walleij
2019-01-18 14:20 ` Gregory CLEMENT
2019-01-21 13:13 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.