From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] OMAP3: cpuidle: change the power domains modes determination logic
Date: Fri, 29 Apr 2011 16:59:49 +0530 [thread overview]
Message-ID: <4DBAA12D.6070203@ti.com> (raw)
In-Reply-To: <1304069186-3086-6-git-send-email-j-pihet@ti.com>
On 4/29/2011 2:56 PM, jean.pihet at newoldbits.com wrote:
> From: Jean Pihet<j-pihet@ti.com>
>
> The achievable power modes of the power domains in cpuidle
> depends on the system wide 'enable_off_mode' knob in debugfs.
> Upon changing enable_off_mode, do not change the C-states
> 'valid' field but instead dynamically restrict the power modes
> when entering idle.
>
> The C-states 'valid' field is just used to enable/disable some
> C-states at init and shall not be changed later on.
>
> Signed-off-by: Jean Pihet<j-pihet@ti.com>
> ---
> arch/arm/mach-omap2/cpuidle34xx.c | 59 +++++++++++++++---------------------
> arch/arm/mach-omap2/pm.h | 4 --
> arch/arm/mach-omap2/pm34xx.c | 12 -------
> 3 files changed, 25 insertions(+), 50 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index 4673cc6..45ccfa7 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -147,22 +147,40 @@ return_sleep_time:
> }
>
> /**
> - * next_valid_state - Find next valid c-state
> + * next_valid_state - Find next valid C-state
> * @dev: cpuidle device
> - * @state: Currently selected c-state
> + * @state: Currently selected C-state
> *
> * If the current state is valid, it is returned back to the caller.
> * Else, this function searches for a lower c-state which is still
> * valid.
> + *
> + * A state is valid if the 'valid' field is enabled and
> + * if it satisfies the enable_off_mode condition.
> */
> static struct cpuidle_state *next_valid_state(struct cpuidle_device *dev,
> struct cpuidle_state *curr)
> {
> struct cpuidle_state *next = NULL;
> struct omap3_idle_statedata *cx = cpuidle_get_statedata(curr);
> + u32 mpu_deepest_state = PWRDM_POWER_RET;
> + u32 core_deepest_state = PWRDM_POWER_RET;
> +
> + if (enable_off_mode) {
> + mpu_deepest_state = PWRDM_POWER_OFF;
> + /*
> + * Erratum i583: valable for ES rev< Es1.2 on 3630.
> + * CORE OFF mode is not supported in a stable form, restrict
> + * instead the CORE state to RET.
> + */
> + if (!IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583))
> + core_deepest_state = PWRDM_POWER_OFF;
> + }
>
Since you have started clean-up, we should get rid of the
"enable_off_mode" some how. I got that done for OMAP4 using
prepare() hook and IGNORE flag as per Kevin's suggestion
but unfortunately its seems to getting removed from
core cpuidle code.
Regards
Santosh
next prev parent reply other threads:[~2011-04-29 11:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 9:26 [PATCH 0/5] OMAP: cpuidle code clean-up jean.pihet at newoldbits.com
2011-04-29 9:26 ` [PATCH 1/5] OMAP3 cpuidle: remove useless SDP specific timings jean.pihet at newoldbits.com
2011-04-29 11:14 ` Santosh Shilimkar
2011-05-04 14:40 ` Kevin Hilman
2011-04-29 9:26 ` [PATCH 2/5] OMAP3: clean-up mach specific cpuidle data structures jean.pihet at newoldbits.com
2011-05-04 20:09 ` Kevin Hilman
2011-04-29 9:26 ` [PATCH 3/5] OMAP3: cpuidle: re-organize the C-states data jean.pihet at newoldbits.com
2011-04-29 11:24 ` Santosh Shilimkar
2011-05-04 14:59 ` Kevin Hilman
2011-04-29 9:26 ` [PATCH 4/5] OMAP3: cpuidle: code rework for improved readability jean.pihet at newoldbits.com
2011-05-04 15:32 ` Kevin Hilman
2011-04-29 9:26 ` [PATCH 5/5] OMAP3: cpuidle: change the power domains modes determination logic jean.pihet at newoldbits.com
2011-04-29 11:29 ` Santosh Shilimkar [this message]
2011-04-29 14:00 ` Jean Pihet
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=4DBAA12D.6070203@ti.com \
--to=santosh.shilimkar@ti.com \
--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 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).