linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Marcin Wojtas <mw@semihalf.com>
Cc: Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Boris BREZILLON <boris.brezillon@free-electrons.com>,
	Tawfik Bayouk <tawfik@marvell.com>,
	Nadav Haklai <nadavh@marvell.com>,
	Lior Amsalem <alior@marvell.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs
Date: Wed, 01 Apr 2015 11:21:30 +0200	[thread overview]
Message-ID: <551BB89A.60405@free-electrons.com> (raw)
In-Reply-To: <CAPv3WKew5FFsA+ZphXO1hfYcy5hi_SzEBBhyk5QtQ5zn-SAenQ@mail.gmail.com>

[-- 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


  parent reply	other threads:[~2015-04-01  9:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-04-01  9:39     ` Marcin Wojtas

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=551BB89A.60405@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=boris.brezillon@free-electrons.com \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tawfik@marvell.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).