From: Francesco VIRLINZI <francesco.virlinzi@st.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: hibernation support
Date: Wed, 11 Mar 2009 13:20:17 +0000 [thread overview]
Message-ID: <49B7BA91.3080608@st.com> (raw)
In-Reply-To: <20090306064156.27281.35572.sendpatchset@rx1.opensource.se>
Hi Magnus
>
> Good plan! I'd like to have this working for suspend as well.
Good.
>
> I guess your goal is to minimize power consumption by turning off
> unused clocks or at least set them to a minimal value before
> suspending.
Yes.
> I'd like to do something like that at least. For the clock
> framework i think we should simply minimize the clock when the usage
> count drops to zero. And let the drivers disable the clock as long as
> it's not needed for wakeup.
Unfortunately it isn't so easy.
If we have one-to-one clock per device a simple counter is enough, but
if you have shared clocks (i.e. a clock X shared between a two wakeup
devices than on suspend the first device could asks "clock_X @ xx MHz"
the second device could asks "clock_X @ yy MHz" and as platform device
the final rate of clock X will be based on how the devices were
registered...
Moreover without a notification of the rate of each clock a wakeup
device will be broken and it doesn't know it is broken.
> ...
> For the overall system my gut feeling is that it would be useful to
> define a set of standby modes, and let the suspend code or cpuidle
> enter the best mode possible after checking dependencies.
Not so easy for us because we have some A-SMP therefore an "idle linux"
doesn't mean an idle hardware.
>
> Right now I have the following modes setup for SuperH Mobile:
>
> #define SUSP_MODE_SLEEP (SUSP_SH_SLEEP)
> #define SUSP_MODE_SLEEP_SF (SUSP_SH_SLEEP | SUSP_SH_SF)
> #define SUSP_MODE_STANDBY_SF (SUSP_SH_STANDBY | SUSP_SH_SF)
>
>
> There is one additional level that turns off the power to the hardware
> blocks as well. This mode is close to hibernation from a software
> point of view.
Yes also us we plan something like that.
> I guess a good match is to use dev_pm_ops->freeze to
> save hardware state before suspending and use thaw to restore state
> when resuming.
> Obviously we can't power off hardware blocks needed for
> wakeup.
>
> How is this compared to your architecture(s)?
On SUSP_MODE_SLEEP_SF and SUSP_MODE_STANDBY_SF.
If I understood you are speaking on 'sleep' and 'deep sleep' capability
of sh4. In this case in the ST40 this difference was removed.
But the behavioral is similar (i.e.: mem in self-refresh, clocks
disabled/reduced... wakeup devices still able to works).
> Are you using cpuidle?
Not currently and I think it will be not so easy to use for us.
> What about cpufreq?
Supported.
> Do you have some profiles setup for run time power management today?
We have a kernel tool to create "power profile" sits on top of
cpufreq-clockfm-device model and until possible (currently possible) it
doesn't touch any device driver; this means the device aren't aware of a
change in term of power profile... they see change in term of
clock_rate-device_state.
Regards
Francesco
next prev parent reply other threads:[~2009-03-11 13:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 6:41 [PATCH] sh: hibernation support Magnus Damm
2009-03-06 6:57 ` Paul Mundt
2009-03-06 7:06 ` Francesco VIRLINZI
2009-03-06 9:53 ` Magnus Damm
2009-03-06 10:05 ` Francesco VIRLINZI
2009-03-06 10:17 ` Francesco VIRLINZI
2009-03-06 17:29 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-07 6:12 ` Paul Mundt
2009-03-07 6:20 ` Paul Mundt
2009-03-09 9:12 ` Francesco VIRLINZI
2009-03-09 9:16 ` Magnus Damm
2009-03-09 9:27 ` Francesco VIRLINZI
2009-03-09 10:03 ` Francesco VIRLINZI
2009-03-09 10:57 ` Magnus Damm
2009-03-09 17:35 ` Paul Mundt
2009-03-10 13:19 ` Francesco VIRLINZI
2009-03-11 4:26 ` Magnus Damm
2009-03-11 6:50 ` Francesco VIRLINZI
2009-03-11 7:29 ` Magnus Damm
2009-03-11 13:20 ` Francesco VIRLINZI [this message]
2009-03-12 5:47 ` Magnus Damm
2009-03-12 8:54 ` Francesco VIRLINZI
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=49B7BA91.3080608@st.com \
--to=francesco.virlinzi@st.com \
--cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox