All of lore.kernel.org
 help / color / mirror / Atom feed
From: stefan@agner.ch (Stefan Agner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/9] ARM: vf610: Suspend/resume support
Date: Wed, 24 Sep 2014 10:22:39 +0200	[thread overview]
Message-ID: <4ee0621b0bf5f4d4e10eae7673bdf1cd@agner.ch> (raw)
In-Reply-To: <87zjdqmjr3.fsf@nbsps.com>

Am 2014-09-23 17:36, schrieb Bill Pringlemeir:
> On 22 Sep 2014, stefan at agner.ch wrote:
> 
>> This patchset provides suspend/resume support for Freescale Vybrid
>> SoC (vf610). The code is generally aligned to the implementation
>> for i.MX6. The subsystems SRC and GPC need some changes to support
>> the Vybrid specific implementation.
>>
>> This patchset relies on GPIO driver to be present (in order to
>> provide a wakeup source) as well as using the ARM Global Timer
>> clock source (the Vybrid specifc PIT clock source, vf_pit_timer.c
>> does not support shutdown).
>>
>> The implemented sleep states (LP-RUN and STOP), are not the most
>> power saving functions available on Vybrid. Especially for
>> suspend-to-memory one of the LPSTOP modes looks more appropriate.
>> However, the complexity is somewhat higher (we would need to move
>> execution path to SRAM and store IOMUX and DDRMC configuration).
>> Currently, I have not the resources to look into that so I hope
>> that this initial code qualifies as power saving functions to be
>> applied.
>>
>> Suspend-to-memory as well as standby mode is tested on Colibri
>> VF61.
> 
>> Power measurement (Colibri VF61, whole module):
>> - Idle: 540mW
>> - LP-RUN: 220mW (standby)
>> - STOP: 200mW (mem)
> 
>> Stefan Agner (9):
>> ARM: dts: vf610: Add system reset controller (SRC)
>> ARM: dts: vf610: add global power controller (GPC)
>> ARM: dts: vf610: add on-chip SRAM
> 
> These above three change sets have some implications for dual-chip
> (Cortex-A5/Cortex-M4) configurations.  Epecially those running MQX.
> There is not harm to define the register space (except DT size).
> However, if you activate drivers that manipulate the registers for all
> systems, then there is no choice to have MQX work on the 2nd core.

On the Timesys BSP, the kernel is fiddling around with this registers
too, and AFAIK MQX is working with that kernel. Is MQX really using the
GPC and SRC modules? I thought MQX is just relying on Linux taking care
of that.

Also, you have this problem with other registers as well, for instance
the CCM module. In fact, to get into deeper sleep modes, you need to
access the GPC (global power controller) as well as the CCM (clock
controller module, for instance the CCM_CLPCR register). When you look
at all the entry sequences, they all fiddling around with the GPC and
the CCM. And I don't think that the kernel can work properly without
having control over the clock module.

IMHO, the SRC and GPC are like the CCM, and need to be under control of
Linux exclusively.

Another case is the SRAM. There are other peripherals which are much
more important, e.g. both instances of the EDMA modules are currently
unconditional part of the device tree.

Besides, afaik you can also use status = "disabled" in a device tree
including the vf610.dtsi. The device tree is parsed sequential, the last
settings wins.

> 
> I think that Shawn Guo already did a patchset to remove stuff from the
> vf610.dtsi to the machine/configuration DT files.
> 
>> ARM: dts: vf610-colibri: GPIO power key
>> gpio: vf610: Extend with wakeup support
>> ARM: imx: gpc: Support vf610 global power controller
>> ARM: imx: src: Support vf610 system reset controller
>> ARM: imx: clk-gate2: allow custom gate configuration
>> ARM: vf610: initial suspend/resume support
>>
>> arch/arm/boot/dts/vf610-colibri-eval-v3.dts | 26 ++
>> arch/arm/boot/dts/vf610.dtsi | 33 +++ arch/arm/mach-imx/Kconfig | 2 +
>> arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/clk-gate2.c | 7 +-
>> arch/arm/mach-imx/clk-vf610.c | 6 + arch/arm/mach-imx/clk.h | 13 +-
>> arch/arm/mach-imx/common.h | 14 +- arch/arm/mach-imx/gpc.c | 61 ++--
>> arch/arm/mach-imx/mach-imx6q.c | 2 +- arch/arm/mach-imx/mach-imx6sl.c
>> | 2 +- arch/arm/mach-imx/mach-vf610.c | 9 +
>> arch/arm/mach-imx/pm-vf610.c | 428 ++++++++++++++++++++++++++++
>> arch/arm/mach-imx/src.c | 11 + drivers/gpio/gpio-vf610.c | 16 ++
>> include/dt-bindings/clock/vf610-clock.h | 3 +- 16 files changed, 605
>> insertions(+), 29 deletions(-) create mode 100644
>> arch/arm/mach-imx/pm-vf610.c

  reply	other threads:[~2014-09-24  8:22 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 17:09 [PATCH 0/9] ARM: vf610: Suspend/resume support Stefan Agner
2014-09-22 17:09 ` Stefan Agner
2014-09-22 17:09 ` [PATCH 1/9] ARM: dts: vf610: Add system reset controller (SRC) Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-24  9:16   ` Linus Walleij
2014-09-24  9:16     ` Linus Walleij
2014-09-24 16:41     ` Stefan Agner
2014-09-24 16:41       ` Stefan Agner
2014-09-25 13:08       ` Philipp Zabel
2014-09-25 13:08         ` Philipp Zabel
2014-09-22 17:09 ` [PATCH 2/9] ARM: dts: vf610: add global power controller (GPC) Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09 ` [PATCH 3/9] ARM: dts: vf610: add on-chip SRAM Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09 ` [PATCH 4/9] ARM: dts: vf610-colibri: GPIO power key Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09 ` [PATCH 5/9] gpio: vf610: Extend with wakeup support Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-24  9:19   ` Linus Walleij
2014-09-24  9:19     ` Linus Walleij
2014-09-24 16:33     ` Stefan Agner
2014-09-24 16:33       ` Stefan Agner
2014-09-24 10:06   ` Lucas Stach
2014-09-24 10:06     ` Lucas Stach
2014-09-24 16:51     ` Stefan Agner
2014-09-24 16:51       ` Stefan Agner
2014-09-22 17:09 ` [PATCH 6/9] ARM: imx: gpc: Support vf610 global power controller Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09 ` [PATCH 7/9] ARM: imx: src: Support vf610 system reset controller Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-22 17:09 ` [PATCH 8/9] ARM: imx: clk-gate2: allow custom gate configuration Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-28  2:02   ` Shawn Guo
2014-09-28  2:02     ` Shawn Guo
2014-09-28  2:02     ` Shawn Guo
2014-09-22 17:09 ` [PATCH 9/9] ARM: vf610: initial suspend/resume support Stefan Agner
2014-09-22 17:09   ` Stefan Agner
2014-09-23 15:36 ` [PATCH 0/9] ARM: vf610: Suspend/resume support Bill Pringlemeir
2014-09-24  8:22   ` Stefan Agner [this message]
2014-09-24 16:33     ` Bill Pringlemeir
2014-09-28  3:08       ` Shawn Guo
2014-09-29 12:47         ` Stefan Agner
2014-09-29 15:39           ` Bill Pringlemeir
2014-09-28  3:15 ` Shawn Guo
2014-09-28  3:15   ` Shawn Guo
2014-09-28  3:15   ` Shawn Guo

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=4ee0621b0bf5f4d4e10eae7673bdf1cd@agner.ch \
    --to=stefan@agner.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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.