From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCHv2 2/6] OMAP3: PM: Added support for INACTIVE and ON states for powerdomains
Date: Tue, 12 Jan 2010 10:28:08 -0800 [thread overview]
Message-ID: <87ljg3ch53.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1259916781-2741-3-git-send-email-tero.kristo@nokia.com> (Tero Kristo's message of "Fri\, 4 Dec 2009 10\:52\:57 +0200")
Tero Kristo <tero.kristo@nokia.com> writes:
> From: Tero Kristo <tero.kristo@nokia.com>
>
> Previously omap_sram_idle() did not know about the difference between ON and
> INACTIVE states, which complicated the state handling in these cases. Now,
> the following changes are done in the idle logic:
>
> - Check for IO-chain arming is changed to reflect desired state (RET)
> - UART clocks will be disabled if we attempt to enter INACTIVE (this allows
> the state change to actually happen)
>
> Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Looks good, will add to PM branch after issues with patch 1 are resolved.
Kevin
> ---
> arch/arm/mach-omap2/pm34xx.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 3b62c96..574492e 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -391,6 +391,7 @@ void omap_sram_idle(void)
> mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
> switch (mpu_next_state) {
> case PWRDM_POWER_ON:
> + case PWRDM_POWER_INACTIVE:
> case PWRDM_POWER_RET:
> /* No need to save context */
> save_state = 0;
> @@ -460,9 +461,11 @@ void omap_sram_idle(void)
> OMAP3430_GR_MOD,
> OMAP3_PRM_VOLTCTRL_OFFSET);
> }
> - /* Enable IO-PAD and IO-CHAIN wakeups */
> - prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
> - omap3_enable_io_chain();
> + if (core_next_state <= PWRDM_POWER_RET) {
> + /* Enable IO-PAD and IO-CHAIN wakeups */
> + prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
> + omap3_enable_io_chain();
> + }
> }
> omap3_intc_prepare_idle();
>
> @@ -561,15 +564,13 @@ void omap_sram_idle(void)
> }
>
> /* Disable IO-PAD and IO-CHAIN wakeup */
> - if (core_next_state < PWRDM_POWER_ON) {
> + if (core_next_state <= PWRDM_POWER_RET) {
> prm_clear_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
> omap3_disable_io_chain();
> }
>
>
> pwrdm_post_transition();
> -
> - omap2_clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]);
> }
>
> int omap3_can_sleep(void)
> @@ -617,7 +618,6 @@ int set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
> }
>
> if (sleep_switch) {
> - omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
> pwrdm_wait_transition(pwrdm);
> pwrdm_state_switch(pwrdm);
> }
> --
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-01-12 18:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 8:52 [PATCHv2 0/6] Idle status patches revisited Tero Kristo
2009-12-04 8:52 ` [PATCHv2 1/6] OMAP: Powerdomains: Add support for INACTIVE state on pwrdm level Tero Kristo
2009-12-04 8:52 ` [PATCHv2 2/6] OMAP3: PM: Added support for INACTIVE and ON states for powerdomains Tero Kristo
2009-12-04 8:52 ` [PATCHv2 3/6] OMAP3: CPUidle: Fixed support for ON / INACTIVE states Tero Kristo
2009-12-04 8:52 ` [PATCHv2 4/6] OMAP3: PM: Removed pwrdm state hacking from omap_sram_idle Tero Kristo
2009-12-04 8:53 ` [PATCHv2 5/6] OMAP: Powerdomains: Add support for checking if pwrdm/clkdm can idle Tero Kristo
2009-12-04 8:53 ` [PATCHv2 6/6] OMAP3: CPUidle: Added peripheral pwrdm checks into bm check Tero Kristo
2010-01-12 18:50 ` Kevin Hilman
2010-01-12 18:57 ` [PATCHv2 5/6] OMAP: Powerdomains: Add support for checking if pwrdm/clkdm can idle Kevin Hilman
2010-01-13 8:14 ` Tero.Kristo
2010-01-12 18:51 ` [PATCHv2 4/6] OMAP3: PM: Removed pwrdm state hacking from omap_sram_idle Kevin Hilman
2010-01-12 18:29 ` [PATCHv2 3/6] OMAP3: CPUidle: Fixed support for ON / INACTIVE states Kevin Hilman
2010-01-12 18:28 ` Kevin Hilman [this message]
2010-01-12 18:25 ` [PATCHv2 1/6] OMAP: Powerdomains: Add support for INACTIVE state on pwrdm level Kevin Hilman
2010-01-13 8:33 ` Tero.Kristo
2010-01-12 19:14 ` [PATCHv2 0/6] Idle status patches revisited Kevin Hilman
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=87ljg3ch53.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=tero.kristo@nokia.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