From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tero.Kristo@nokia.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 16/17] OMAP3: PM: Write voltage and clock setup times dynamically in idle loop
Date: Wed, 21 Oct 2009 07:15:06 -0700 [thread overview]
Message-ID: <87r5swomtx.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1F18D6510CF0474A8C9500565A7E41A210F6A58235@NOK-EUMSG-02.mgdnok.nokia.com> (Tero Kristo's message of "Wed\, 21 Oct 2009 11\:55\:42 +0200")
<Tero.Kristo@nokia.com> writes:
>
>
>>-----Original Message-----
>>From: ext Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>Sent: 20 October, 2009 20:48
>>To: Kristo Tero (Nokia-D/Tampere)
>>Cc: linux-omap@vger.kernel.org
>>Subject: Re: [PATCH 16/17] OMAP3: PM: Write voltage and clock
>>setup times dynamically in idle loop
>>
>>Tero Kristo <tero.kristo@nokia.com> writes:
>>
>>> From: Tero Kristo <tero.kristo@nokia.com>
>>>
>>> It is suggested by TI (SWPA152 February 2009) to write clksetup,
>>> voltsetup_time1, voltsetup_time2, voltsetup2 dynamically in
>>idle loop.
>>
>>Can you summarize the reasons why?
>
> Basically this optimizes the clksetup / voltsetup times according to the sleep mode. Currently the settings are too high in both retention and off-mode, because the hardware appears to use for example VOLTSETUP2 even if we are not in off-mode, adding extra delay to wakeup. Also, CLKSETUP is too high for retention mode because oscillator is not actually shut-off here.
>
> However, now that I think about it, it might be better to change this in a way that it is user configurable whether we want to change the settings or not, maybe add new items in to the prm_setup struct for alternate settings for ret / off and only use these if available. Some boards might actually switch oscillator off in retention mode which would require higher setup time.
>
>>
>>> Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
>>> ---
>>> arch/arm/mach-omap2/pm34xx.c | 36
>>+++++++++++++++++++++++++-----------
>>> 1 files changed, 25 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/pm34xx.c
>>b/arch/arm/mach-omap2/pm34xx.c
>>> index f492142..ae83121 100644
>>> --- a/arch/arm/mach-omap2/pm34xx.c
>>> +++ b/arch/arm/mach-omap2/pm34xx.c
>>> @@ -575,6 +575,30 @@ void omap_sram_idle(void)
>>> if (regset_save_on_suspend)
>>> pm_dbg_regset_save(1);
>>>
>>> + /* Write voltage setup times which are changed dynamically */
>>
>>AFAICT, we only set these values at init time and they are never
>>changed. Are there some forthcoming patches that change these
>>dynamically?
>
> Following bit of the code actually changes them dynamically, you can
> see that e.g. CLKSETUP time is either prm_setup.clksetup or 0x1
> depending on the sleep mode.
Doh, I see now.
> But as previously said, I think these should probably be added as
> new items to the prm_setup struct.
Yes, I would rather see the prm_setup struct extended so these can be
passed in by board code.
Kevin
>>
>>Kevin
>>
>>> + if (core_next_state == PWRDM_POWER_OFF) {
>>> + prm_write_mod_reg(0, OMAP3430_GR_MOD,
>>> + OMAP3_PRM_VOLTSETUP1_OFFSET);
>>> + prm_write_mod_reg(prm_setup.voltsetup2, OMAP3430_GR_MOD,
>>> + OMAP3_PRM_VOLTSETUP2_OFFSET);
>>> + prm_write_mod_reg(prm_setup.clksetup, OMAP3430_GR_MOD,
>>> + OMAP3_PRM_CLKSETUP_OFFSET);
>>> + } else {
>>> + prm_write_mod_reg((prm_setup.voltsetup_time2 <<
>>> + OMAP3430_SETUP_TIME2_SHIFT) |
>>> + (prm_setup.voltsetup_time1 <<
>>> + OMAP3430_SETUP_TIME1_SHIFT),
>>> + OMAP3430_GR_MOD,
>>OMAP3_PRM_VOLTSETUP1_OFFSET);
>>> + prm_write_mod_reg(0, OMAP3430_GR_MOD,
>>> + OMAP3_PRM_VOLTSETUP2_OFFSET);
>>> + /*
>>> + * Use static 1 as only HF_CLKOUT is turned off.
>>> + * Value taken from application note SWPA152
>>> + */
>>> + prm_write_mod_reg(0x1, OMAP3430_GR_MOD,
>>> + OMAP3_PRM_CLKSETUP_OFFSET);
>>> + }
>>> +
>>> /*
>>> * omap3_arm_context is the location where ARM registers
>>> * get saved. The restore path then reads from this
>>> @@ -1379,19 +1403,9 @@ static void __init configure_vc(void)
>>> OMAP3430_GR_MOD,
>>> OMAP3_PRM_VC_I2C_CFG_OFFSET);
>>>
>>> - /* Write setup times */
>>> - prm_write_mod_reg(prm_setup.clksetup, OMAP3430_GR_MOD,
>>> - OMAP3_PRM_CLKSETUP_OFFSET);
>>> - prm_write_mod_reg((prm_setup.voltsetup_time2 <<
>>> - OMAP3430_SETUP_TIME2_SHIFT) |
>>> - (prm_setup.voltsetup_time1 <<
>>> - OMAP3430_SETUP_TIME1_SHIFT),
>>> - OMAP3430_GR_MOD, OMAP3_PRM_VOLTSETUP1_OFFSET);
>>> -
>>> + /* Write static setup times */
>>> prm_write_mod_reg(prm_setup.voltoffset, OMAP3430_GR_MOD,
>>> OMAP3_PRM_VOLTOFFSET_OFFSET);
>>> - prm_write_mod_reg(prm_setup.voltsetup2, OMAP3430_GR_MOD,
>>> - OMAP3_PRM_VOLTSETUP2_OFFSET);
>>>
>>> pm_dbg_regset_init(1);
>>> pm_dbg_regset_init(2);
>>> --
>>> 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:[~2009-10-21 14:15 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 10:48 [PATCH 00/17] Misc PM patches Tero Kristo
2009-10-16 10:48 ` [PATCH 01/17] PM: fix suspend control for IVA2 Tero Kristo
2009-10-16 10:48 ` [PATCH 02/17] OMAP3: PM: Dynamic check for CORE target state Tero Kristo
2009-10-16 10:48 ` [PATCH 03/17] PM: Block CORE off when DSS is active Tero Kristo
2009-10-16 10:48 ` [PATCH 04/17] OMAP3: PM: Do not enable IO wake-up on boot Tero Kristo
2009-10-16 10:48 ` [PATCH 05/17] OMAP:PM: Precedence fix Tero Kristo
2009-10-16 10:48 ` [PATCH 06/17] OMAP3: PM: Added next state check for IVA2, USB and PER into idle loop Tero Kristo
2009-10-16 10:49 ` [PATCH 07/17] OMAP3: Disable Smartreflex before pwrdm enters RET Tero Kristo
2009-10-16 10:49 ` [PATCH 08/17] OMAP2/3: GPTIMER: Clear pending interrupts when entering suspend Tero Kristo
2009-10-16 10:49 ` [PATCH 09/17] OMAP3: PM: Ack pending interrupts before " Tero Kristo
2009-10-16 10:49 ` [PATCH 10/17] OMAP3: PM: Enable system control module autoidle Tero Kristo
2009-10-16 10:49 ` [PATCH 11/17] Make USBHOST powerdomain go to sleep after warm reset Tero Kristo
2009-10-16 10:49 ` [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller Tero Kristo
2009-10-16 10:49 ` [PATCH 13/17] OMAP3: Fixed ARM aux ctrl register save/restore Tero Kristo
2009-10-16 10:49 ` [PATCH 14/17] OMAP3: PM: Disabled I2C4 repeated start operation mode Tero Kristo
2009-10-16 10:49 ` [PATCH 15/17] OMAP3: PM: Added support for L2 aux ctrl register save and restore Tero Kristo
2009-10-16 10:49 ` [PATCH 16/17] OMAP3: PM: Write voltage and clock setup times dynamically in idle loop Tero Kristo
2009-10-16 10:49 ` [PATCH 17/17] OMAP3: PM: Force disable OTG autoidle Tero Kristo
2009-10-20 18:44 ` Kevin Hilman
2009-10-21 10:21 ` Tero.Kristo
2009-10-20 17:47 ` [PATCH 16/17] OMAP3: PM: Write voltage and clock setup times dynamically in idle loop Kevin Hilman
2009-10-21 9:55 ` Tero.Kristo
2009-10-21 14:15 ` Kevin Hilman [this message]
2009-10-21 15:37 ` Tero.Kristo
2009-10-16 14:39 ` [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller Woodruff, Richard
2009-10-16 17:47 ` Girish S G
2009-10-16 18:04 ` Woodruff, Richard
[not found] ` <005001ca4e8b$ea107c10$3d1018ac@am.dhcp.ti! .com>
2009-10-16 18:10 ` Girish S G
2009-10-19 10:18 ` Tero.Kristo
2009-10-19 17:21 ` Woodruff, Richard
2009-10-19 18:31 ` Girish S G
2009-10-20 16:01 ` Kevin Hilman
2009-10-20 16:15 ` Tero.Kristo
2009-10-20 16:32 ` Kevin Hilman
2009-10-21 4:37 ` Gopinath, Thara
2009-10-21 15:25 ` Girish S G
2009-10-20 16:19 ` Girish S G
2009-10-20 17:39 ` [PATCH 11/17] Make USBHOST powerdomain go to sleep after warm reset Kevin Hilman
2009-10-20 17:30 ` [PATCH 09/17] OMAP3: PM: Ack pending interrupts before entering suspend Kevin Hilman
2009-10-21 10:03 ` Tero.Kristo
2009-10-21 14:19 ` Kevin Hilman
2009-10-21 16:01 ` Tero.Kristo
2009-10-20 17:36 ` [PATCH 08/17] OMAP2/3: GPTIMER: Clear pending interrupts when " Kevin Hilman
2009-10-21 10:09 ` Tero.Kristo
2009-10-16 13:16 ` [PATCH 06/17] OMAP3: PM: Added next state check for IVA2, USB and PER into idle loop Sripathy, Vishwanath
2009-10-16 13:35 ` Tero.Kristo
2009-10-16 14:57 ` Cousson, Benoit
2009-10-20 19:04 ` Kevin Hilman
2009-10-20 17:23 ` [PATCH 05/17] OMAP:PM: Precedence fix Kevin Hilman
2009-10-20 17:21 ` [PATCH 04/17] OMAP3: PM: Do not enable IO wake-up on boot Kevin Hilman
2009-10-16 15:27 ` [PATCH 03/17] PM: Block CORE off when DSS is active Cousson, Benoit
2009-10-19 9:37 ` Tero.Kristo
2009-10-20 17:19 ` Kevin Hilman
2009-10-20 16:16 ` [PATCH 02/17] OMAP3: PM: Dynamic check for CORE target state Kevin Hilman
2009-10-16 17:16 ` [PATCH 01/17] PM: fix suspend control for IVA2 Girish S G
2009-10-19 9:22 ` Tero.Kristo
2009-10-19 18:26 ` Girish S G
2009-10-20 16:10 ` Kevin Hilman
2009-10-22 10:24 ` Paul Walmsley
2009-10-22 21:21 ` Woodruff, Richard
2009-10-23 5:22 ` Artem Bityutskiy
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=87r5swomtx.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=Tero.Kristo@nokia.com \
--cc=linux-omap@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