From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
Jean Pihet <jean.pihet@newoldbits.com>, Tony <tony@atomide.com>
Subject: Re: [PATCH v4 7/7] OMAP3630: PM: Erratum i583: disable coreoff if < ES1.2
Date: Mon, 20 Dec 2010 11:05:00 -0800 [thread overview]
Message-ID: <8739ps5kpv.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1292712817-24999-8-git-send-email-nm@ti.com> (Nishanth Menon's message of "Sat, 18 Dec 2010 16:53:37 -0600")
Nishanth Menon <nm@ti.com> writes:
> From: Eduardo Valentin <eduardo.valentin@nokia.com>
>
> Limitation i583: Self_Refresh Exit issue after OFF mode
>
> Issue:
> When device is waking up from OFF mode, then SDRC state machine sends
> inappropriate sequence violating JEDEC standards.
>
> Impact:
> OMAP3630 < ES1.2 is impacted as follows depending on the platform:
> CS0: for 38.4MHz as internal sysclk, DDR content seen to be stable, while
> for all other sysclk frequencies, varied levels of instability
> seen based on varied parameters.
> CS1: impacted
>
> This patch takes option #3 as recommended by the Silicon erratum:
> Avoid core power domain transitioning to OFF mode. Power consumption
> impact is expected in this case.
> To do this, we route core OFF requests to RET request on the impacted
> revisions of silicon.
>
> [nm@ti.com: rebased the code to 2.6.37-rc2- short circuit code changed a bit]
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> ---
> v4: idle state control changed a bit -we wont register or enable
> the states which cannot be enabled.
I like this version. Thanks.
> v3: http://marc.info/?t=129140247800027&r=1&w=2
> no functional change in erratum wa implementation, just registration of
> erratum is collated to a single cpu detection and version check
> v2: https://patchwork.kernel.org/patch/365262/
> rebased to this patch series instead of depending on hs changes
> fix typo for macro definition
> v1: http://marc.info/?l=linux-omap&m=129013173425266&w=2
> arch/arm/mach-omap2/cpuidle34xx.c | 10 ++++++++++
> arch/arm/mach-omap2/pm.h | 1 +
> arch/arm/mach-omap2/pm34xx.c | 24 +++++++++++++++++++++---
> 3 files changed, 32 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index f80d3f6..1b32e98 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -453,6 +453,16 @@ void omap_init_power_states(void)
> omap3_power_states[OMAP3_STATE_C7].core_state = PWRDM_POWER_OFF;
> omap3_power_states[OMAP3_STATE_C7].flags = CPUIDLE_FLAG_TIME_VALID |
> CPUIDLE_FLAG_CHECK_BM;
> +
> + /*
> + * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
> + * enable OFF mode in a stable form for previous revisions.
> + * we disable C7 state as a result.
> + */
> + if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583)) {
> + omap3_power_states[OMAP3_STATE_C7].valid = 0;
> + cpuidle_params_table[OMAP3_STATE_C7].valid = 0;
> + }
> }
>
> struct cpuidle_driver omap3_idle_driver = {
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index 92ef400..9032d09 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -87,6 +87,7 @@ extern unsigned int omap24xx_cpu_suspend_sz;
> extern unsigned int omap34xx_cpu_suspend_sz;
>
> #define PM_RTA_ERRATUM_i608 (1 << 0)
> +#define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1)
>
> #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
> extern u16 pm34xx_errata;
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 21cd36e..7faea55 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -928,12 +928,28 @@ void omap3_pm_off_mode_enable(int enable)
> state = PWRDM_POWER_RET;
>
> #ifdef CONFIG_CPU_IDLE
> - omap3_cpuidle_update_states(state, state);
> + /*
> + * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
> + * enable OFF mode in a stable form for previous revisions, restrict
> + * instead to RET
> + */
> + if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583))
> + omap3_cpuidle_update_states(state, PWRDM_POWER_RET);
> + else
> + omap3_cpuidle_update_states(state, state);
> #endif
>
> list_for_each_entry(pwrst, &pwrst_list, node) {
> - pwrst->next_state = state;
> - omap_set_pwrdm_state(pwrst->pwrdm, state);
> + if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583) &&
> + pwrst->pwrdm == core_pwrdm &&
> + state == PWRDM_POWER_OFF) {
> + pwrst->next_state = PWRDM_POWER_RET;
> + pr_err("%s: Core OFF disabled due to errata i583\n",
> + __func__);
This is a warning, not an error condition, so should probably be
pr_warning().
That being said, this could be noisy if enable_off_mode is being toggled
repeatedly, so using WARN_ONCE() might be more appropriate as suggested
by others.
Kevin
> + } else {
> + pwrst->next_state = state;
> + }
> + omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
> }
> }
>
> @@ -1011,6 +1027,8 @@ static void __init pm_errata_configure(void)
> pm34xx_errata |= PM_RTA_ERRATUM_i608;
> /* Enable the l2 cache toggling in sleep logic */
> enable_omap3630_toggle_l2_on_restore();
> + if (omap_rev() < OMAP3630_REV_ES1_2)
> + pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583;
> }
> }
WARNING: multiple messages have this Message-ID (diff)
From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 7/7] OMAP3630: PM: Erratum i583: disable coreoff if < ES1.2
Date: Mon, 20 Dec 2010 11:05:00 -0800 [thread overview]
Message-ID: <8739ps5kpv.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1292712817-24999-8-git-send-email-nm@ti.com> (Nishanth Menon's message of "Sat, 18 Dec 2010 16:53:37 -0600")
Nishanth Menon <nm@ti.com> writes:
> From: Eduardo Valentin <eduardo.valentin@nokia.com>
>
> Limitation i583: Self_Refresh Exit issue after OFF mode
>
> Issue:
> When device is waking up from OFF mode, then SDRC state machine sends
> inappropriate sequence violating JEDEC standards.
>
> Impact:
> OMAP3630 < ES1.2 is impacted as follows depending on the platform:
> CS0: for 38.4MHz as internal sysclk, DDR content seen to be stable, while
> for all other sysclk frequencies, varied levels of instability
> seen based on varied parameters.
> CS1: impacted
>
> This patch takes option #3 as recommended by the Silicon erratum:
> Avoid core power domain transitioning to OFF mode. Power consumption
> impact is expected in this case.
> To do this, we route core OFF requests to RET request on the impacted
> revisions of silicon.
>
> [nm at ti.com: rebased the code to 2.6.37-rc2- short circuit code changed a bit]
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> ---
> v4: idle state control changed a bit -we wont register or enable
> the states which cannot be enabled.
I like this version. Thanks.
> v3: http://marc.info/?t=129140247800027&r=1&w=2
> no functional change in erratum wa implementation, just registration of
> erratum is collated to a single cpu detection and version check
> v2: https://patchwork.kernel.org/patch/365262/
> rebased to this patch series instead of depending on hs changes
> fix typo for macro definition
> v1: http://marc.info/?l=linux-omap&m=129013173425266&w=2
> arch/arm/mach-omap2/cpuidle34xx.c | 10 ++++++++++
> arch/arm/mach-omap2/pm.h | 1 +
> arch/arm/mach-omap2/pm34xx.c | 24 +++++++++++++++++++++---
> 3 files changed, 32 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index f80d3f6..1b32e98 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -453,6 +453,16 @@ void omap_init_power_states(void)
> omap3_power_states[OMAP3_STATE_C7].core_state = PWRDM_POWER_OFF;
> omap3_power_states[OMAP3_STATE_C7].flags = CPUIDLE_FLAG_TIME_VALID |
> CPUIDLE_FLAG_CHECK_BM;
> +
> + /*
> + * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
> + * enable OFF mode in a stable form for previous revisions.
> + * we disable C7 state as a result.
> + */
> + if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583)) {
> + omap3_power_states[OMAP3_STATE_C7].valid = 0;
> + cpuidle_params_table[OMAP3_STATE_C7].valid = 0;
> + }
> }
>
> struct cpuidle_driver omap3_idle_driver = {
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index 92ef400..9032d09 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -87,6 +87,7 @@ extern unsigned int omap24xx_cpu_suspend_sz;
> extern unsigned int omap34xx_cpu_suspend_sz;
>
> #define PM_RTA_ERRATUM_i608 (1 << 0)
> +#define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1)
>
> #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
> extern u16 pm34xx_errata;
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 21cd36e..7faea55 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -928,12 +928,28 @@ void omap3_pm_off_mode_enable(int enable)
> state = PWRDM_POWER_RET;
>
> #ifdef CONFIG_CPU_IDLE
> - omap3_cpuidle_update_states(state, state);
> + /*
> + * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
> + * enable OFF mode in a stable form for previous revisions, restrict
> + * instead to RET
> + */
> + if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583))
> + omap3_cpuidle_update_states(state, PWRDM_POWER_RET);
> + else
> + omap3_cpuidle_update_states(state, state);
> #endif
>
> list_for_each_entry(pwrst, &pwrst_list, node) {
> - pwrst->next_state = state;
> - omap_set_pwrdm_state(pwrst->pwrdm, state);
> + if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583) &&
> + pwrst->pwrdm == core_pwrdm &&
> + state == PWRDM_POWER_OFF) {
> + pwrst->next_state = PWRDM_POWER_RET;
> + pr_err("%s: Core OFF disabled due to errata i583\n",
> + __func__);
This is a warning, not an error condition, so should probably be
pr_warning().
That being said, this could be noisy if enable_off_mode is being toggled
repeatedly, so using WARN_ONCE() might be more appropriate as suggested
by others.
Kevin
> + } else {
> + pwrst->next_state = state;
> + }
> + omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
> }
> }
>
> @@ -1011,6 +1027,8 @@ static void __init pm_errata_configure(void)
> pm34xx_errata |= PM_RTA_ERRATUM_i608;
> /* Enable the l2 cache toggling in sleep logic */
> enable_omap3630_toggle_l2_on_restore();
> + if (omap_rev() < OMAP3630_REV_ES1_2)
> + pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583;
> }
> }
next prev parent reply other threads:[~2010-12-20 19:05 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 22:53 [PATCH v4 0/7] OMAP: idle path errata fixes Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-18 22:53 ` [PATCH v4 1/7] OMAP3: PM: Update clean_l2 to use v7_flush_dcache_all Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 6:43 ` Santosh Shilimkar
2010-12-20 6:43 ` Santosh Shilimkar
2010-12-20 10:19 ` Jean Pihet
2010-12-20 10:19 ` Jean Pihet
2010-12-18 22:53 ` [PATCH v4 2/7] OMAP3: PM: Erratum i581 support: dll kick strategy Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 6:47 ` Santosh Shilimkar
2010-12-20 6:47 ` Santosh Shilimkar
2010-12-20 14:16 ` Nishanth Menon
2010-12-20 14:16 ` Nishanth Menon
2010-12-20 10:23 ` Jean Pihet
2010-12-20 10:23 ` Jean Pihet
2010-12-20 11:33 ` Peter 'p2' De Schrijver
2010-12-20 14:21 ` Nishanth Menon
2010-12-20 14:21 ` Nishanth Menon
2010-12-18 22:53 ` [PATCH v4 3/7] omap3: pm: introduce errata handling Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 10:18 ` Jean Pihet
2010-12-20 10:18 ` Jean Pihet
2010-12-20 14:39 ` Nishanth Menon
2010-12-20 14:39 ` Nishanth Menon
2010-12-18 22:53 ` [PATCH v4 4/7] OMAP3630: PM: Erratum i608: disable RTA Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 6:59 ` Santosh Shilimkar
2010-12-20 6:59 ` Santosh Shilimkar
2010-12-20 11:23 ` Nishanth Menon
2010-12-20 11:23 ` Nishanth Menon
2010-12-20 12:15 ` Santosh Shilimkar
2010-12-20 12:15 ` Santosh Shilimkar
2010-12-20 10:27 ` Jean Pihet
2010-12-20 10:27 ` Jean Pihet
2010-12-20 14:45 ` Nishanth Menon
2010-12-20 14:45 ` Nishanth Menon
2010-12-18 22:53 ` [PATCH v4 5/7] OMAP3630: PM: Disable L2 cache while invalidating L2 cache Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 7:13 ` Santosh Shilimkar
2010-12-20 7:13 ` Santosh Shilimkar
2010-12-20 11:44 ` Nishanth Menon
2010-12-20 11:44 ` Nishanth Menon
2010-12-20 12:14 ` Santosh Shilimkar
2010-12-20 12:14 ` Santosh Shilimkar
2010-12-20 13:08 ` Nishanth Menon
2010-12-20 13:08 ` Nishanth Menon
2010-12-20 13:29 ` Santosh Shilimkar
2010-12-20 13:29 ` Santosh Shilimkar
2010-12-20 13:33 ` Nishanth Menon
2010-12-20 13:33 ` Nishanth Menon
2010-12-20 13:37 ` Santosh Shilimkar
2010-12-20 13:37 ` Santosh Shilimkar
2010-12-20 10:28 ` Jean Pihet
2010-12-20 10:28 ` Jean Pihet
2010-12-18 22:53 ` [PATCH v4 6/7] OMAP3: PM: make omap3_cpuidle_update_states independent of enable_off_mode Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 7:16 ` Santosh Shilimkar
2010-12-20 7:16 ` Santosh Shilimkar
2010-12-20 10:28 ` Jean Pihet
2010-12-20 10:28 ` Jean Pihet
2010-12-18 22:53 ` [PATCH v4 7/7] OMAP3630: PM: Erratum i583: disable coreoff if < ES1.2 Nishanth Menon
2010-12-18 22:53 ` Nishanth Menon
2010-12-20 6:51 ` Santosh Shilimkar
2010-12-20 6:51 ` Santosh Shilimkar
2010-12-20 10:26 ` Jean Pihet
2010-12-20 10:26 ` Jean Pihet
2010-12-20 11:22 ` Nishanth Menon
2010-12-20 11:22 ` Nishanth Menon
2010-12-20 19:05 ` Kevin Hilman [this message]
2010-12-20 19:05 ` Kevin Hilman
2010-12-20 19:07 ` Nishanth Menon
2010-12-20 19:07 ` Nishanth Menon
2010-12-20 10:17 ` [PATCH v4 0/7] OMAP: idle path errata fixes Jean Pihet
2010-12-20 10:17 ` 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=8739ps5kpv.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=jean.pihet@newoldbits.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.