2015-04-01 09:02:51

by Marcin Wojtas

[permalink] [raw]
Subject: Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs

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 <[email protected]>:
> 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
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


2015-04-01 09:18:36

by Thomas Petazzoni

[permalink] [raw]
Subject: Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs

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

2015-04-01 09:21:37

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs

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 <[email protected]>:
>> 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
>> [email protected]
>> 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


Attachments:
0001-ARM-mvebu-adjust-mbus-controller-description-on-Arma.patch (1.18 kB)

2015-04-01 09:39:24

by Marcin Wojtas

[permalink] [raw]
Subject: Re: [PATCH 0/5] Add standby support for the recent mvebu SoCs

Thanks, it heleped.

Best regards,
Marcin

2015-04-01 11:21 GMT+02:00 Gregory CLEMENT <[email protected]>:
> 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 <[email protected]>:
>>> 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
>>> [email protected]
>>> 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