From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Victor Gallardo <vgallardo@apm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/3] Powerpc/4xx: Add suspend and idle support
Date: Fri, 8 Oct 2010 09:35:11 -0400 [thread overview]
Message-ID: <20101008133511.GA10590@zod.rchland.ibm.com> (raw)
In-Reply-To: <1286478436-9942-1-git-send-email-vgallardo@apm.com>
On Thu, Oct 07, 2010 at 12:07:16PM -0700, Victor Gallardo wrote:
>Add suspend/resume support for all 4xx compatible CPUs.
>See /sys/power/state for available power states configured in.
>
>Add two different idle states (idle-wait and idle-doze)
>controlled via sysfs. Default is idle-wait.
> cat /sys/devices/system/cpu/cpu0/idle
> [wait] doze
>
>To save additional power, use idle-doze.
> echo doze > /sys/devices/system/cpu/cpu0/idle
> cat /sys/devices/system/cpu/cpu0/idle
> wait [doze]
>
>Signed-off-by: Victor Gallardo <vgallardo@apm.com>
>---
> Documentation/powerpc/dts-bindings/4xx/cpm.txt | 43 +++
> arch/powerpc/Kconfig | 13 +-
> arch/powerpc/platforms/44x/Makefile | 5 +-
> arch/powerpc/sysdev/Makefile | 1 +
> arch/powerpc/sysdev/ppc4xx_cpm.c | 339 ++++++++++++++++++++++++
> 5 files changed, 397 insertions(+), 4 deletions(-)
> create mode 100644 Documentation/powerpc/dts-bindings/4xx/cpm.txt
> create mode 100644 arch/powerpc/sysdev/ppc4xx_cpm.c
>
>diff --git a/Documentation/powerpc/dts-bindings/4xx/cpm.txt b/Documentation/powerpc/dts-bindings/4xx/cpm.txt
>new file mode 100644
>index 0000000..9635df8
>--- /dev/null
>+++ b/Documentation/powerpc/dts-bindings/4xx/cpm.txt
>@@ -0,0 +1,43 @@
>+PPC4xx Clock Power Management (CPM) node
>+
>+Required properties:
>+ - compatible : compatible list, currently only "ibm,cpm"
>+ - dcr-access-method : "native"
>+ - dcr-reg : < DCR register range >
>+
>+Optional properties:
>+ - er-offset : All 4xx SoCs with a CPM controller have
>+ one of two different order for the CPM
>+ registers. Some have the CPM registers
>+ in the following order (ER,FR,SR). The
>+ others have them in the following order
>+ (SR,ER,FR). For the second case set
>+ er-offset = <1>.
>+ - unused-units : specifier consist of one cell. For each
>+ bit in the cell, the corresponding bit
>+ in CPM will be set to turn off unused
>+ devices.
>+ - idle-doze : specifier consist of one cell. For each
>+ bit in the cell, the corresponding bit
>+ in CPM will be set to turn off unused
>+ devices. This is usually just CPM[CPU].
>+ - standby : specifier consist of one cell. For each
>+ bit in the cell, the corresponding bit
>+ in CPM will be set on standby and
>+ restored on resume.
>+ - suspend : specifier consist of one cell. For each
>+ bit in the cell, the corresponding bit
>+ in CPM will be set on suspend (mem) and
>+ restored on resume.
So the difference, from what I can tell, between standby and suspend is
really only what devices are turned off. I don't see any code to put
the DRAM into self-refresh mode, etc. If that is the case, perhaps we
could add a bit of description as to the different kinds of devices that
may be disabled in one mode but not the other.
>+
>+Example:
>+ CPM0: cpm {
>+ compatible = "ibm,cpm";
>+ dcr-access-method = "native";
>+ dcr-reg = <0x160 0x003>;
>+ er-offset = <0>;
>+ unused-units = <0x00000100>;
>+ idle-doze = <0x02000000>;
>+ standby = <0xfeff0000>;
>+ standby = <0xfeff791d>;
One of these two should be illustrating suspend.
josh
next prev parent reply other threads:[~2010-10-08 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 19:07 [PATCH 1/3] Powerpc/4xx: Add suspend and idle support Victor Gallardo
2010-10-08 13:35 ` Josh Boyer [this message]
2010-10-08 17:30 ` Victor Gallardo
2010-10-08 13:46 ` Josh Boyer
2010-10-08 17:32 ` Victor Gallardo
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=20101008133511.GA10590@zod.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=vgallardo@apm.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