From: Kevin Hilman <khilman@ti.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/6] arm: omap3: add manual control for mpu_iva voltdm usecounting
Date: Tue, 14 Feb 2012 11:35:51 -0800 [thread overview]
Message-ID: <8762f96wdk.fsf@ti.com> (raw)
In-Reply-To: <1329237402-26008-5-git-send-email-t-kristo@ti.com> (Tero Kristo's message of "Tue, 14 Feb 2012 18:36:40 +0200")
Tero Kristo <t-kristo@ti.com> writes:
> mpu_iva voltdm usecount is now decreased during idle. This will
> allow the voltagedomain to reflect actual usage, and will allow
> proper usage of vc callbacks.
I don't follow why this is needed in the idle path.
Why aren't the usecounts from clock/powerdomain disables (enables) causing this
voltdm disable (enable) to happen automatcially?
If these are needed, seems like they should be in the
pwrdm_[pre|post]_transition() hooks so they can be generic.
Kevin
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> ---
> arch/arm/mach-omap2/pm34xx.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index fc69875..14defaf 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -74,6 +74,7 @@ void (*omap3_do_wfi_sram)(void);
> static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
> static struct powerdomain *core_pwrdm, *per_pwrdm;
> static struct powerdomain *cam_pwrdm;
> +static struct voltagedomain *mpu_iva_voltdm;
>
> static inline void omap3_per_save_context(void)
> {
> @@ -311,6 +312,8 @@ void omap_sram_idle(void)
> return;
> }
>
> + voltdm_pwrdm_disable(mpu_iva_voltdm);
> +
> /* NEON control */
> if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
> pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state);
> @@ -393,6 +396,8 @@ void omap_sram_idle(void)
> }
> omap3_intc_resume_idle();
>
> + voltdm_pwrdm_enable(mpu_iva_voltdm);
> +
> pwrdm_post_transition();
>
> /* PER */
> @@ -828,6 +833,9 @@ static int __init omap3_pm_init(void)
>
> (void) clkdm_for_each(clkdms_setup, NULL);
>
> + mpu_iva_voltdm = voltdm_lookup("mpu_iva");
> + voltdm_pwrdm_enable(mpu_iva_voltdm);
> +
> mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
> if (mpu_pwrdm == NULL) {
> printk(KERN_ERR "Failed to get mpu_pwrdm\n");
WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] arm: omap3: add manual control for mpu_iva voltdm usecounting
Date: Tue, 14 Feb 2012 11:35:51 -0800 [thread overview]
Message-ID: <8762f96wdk.fsf@ti.com> (raw)
In-Reply-To: <1329237402-26008-5-git-send-email-t-kristo@ti.com> (Tero Kristo's message of "Tue, 14 Feb 2012 18:36:40 +0200")
Tero Kristo <t-kristo@ti.com> writes:
> mpu_iva voltdm usecount is now decreased during idle. This will
> allow the voltagedomain to reflect actual usage, and will allow
> proper usage of vc callbacks.
I don't follow why this is needed in the idle path.
Why aren't the usecounts from clock/powerdomain disables (enables) causing this
voltdm disable (enable) to happen automatcially?
If these are needed, seems like they should be in the
pwrdm_[pre|post]_transition() hooks so they can be generic.
Kevin
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> ---
> arch/arm/mach-omap2/pm34xx.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index fc69875..14defaf 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -74,6 +74,7 @@ void (*omap3_do_wfi_sram)(void);
> static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
> static struct powerdomain *core_pwrdm, *per_pwrdm;
> static struct powerdomain *cam_pwrdm;
> +static struct voltagedomain *mpu_iva_voltdm;
>
> static inline void omap3_per_save_context(void)
> {
> @@ -311,6 +312,8 @@ void omap_sram_idle(void)
> return;
> }
>
> + voltdm_pwrdm_disable(mpu_iva_voltdm);
> +
> /* NEON control */
> if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
> pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state);
> @@ -393,6 +396,8 @@ void omap_sram_idle(void)
> }
> omap3_intc_resume_idle();
>
> + voltdm_pwrdm_enable(mpu_iva_voltdm);
> +
> pwrdm_post_transition();
>
> /* PER */
> @@ -828,6 +833,9 @@ static int __init omap3_pm_init(void)
>
> (void) clkdm_for_each(clkdms_setup, NULL);
>
> + mpu_iva_voltdm = voltdm_lookup("mpu_iva");
> + voltdm_pwrdm_enable(mpu_iva_voltdm);
> +
> mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
> if (mpu_pwrdm == NULL) {
> printk(KERN_ERR "Failed to get mpu_pwrdm\n");
next prev parent reply other threads:[~2012-02-14 19:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 16:36 [PATCH 0/6] arm: omap: clk/clkdm/pwrdm/voltdm changes to usecounting Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 16:36 ` [PATCH 1/6] arm: omap: clk: add support for omap_clk_for_each Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 16:36 ` [PATCH 2/6] arm: omap3+: voltage/pwrdm/clkdm/clock add recursive usecount tracking Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 16:36 ` [PATCH 3/6] arm: omap3+: voltage: add support for voltagedomain usecounts Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 16:36 ` [PATCH 4/6] arm: omap3: add manual control for mpu_iva voltdm usecounting Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 19:35 ` Kevin Hilman [this message]
2012-02-14 19:35 ` Kevin Hilman
2012-02-15 8:16 ` Tero Kristo
2012-02-15 8:16 ` Tero Kristo
2012-02-15 19:29 ` Kevin Hilman
2012-02-15 19:29 ` Kevin Hilman
2012-02-14 16:36 ` [PATCH 5/6] arm: omap3: set autoidle flags for a few clocks Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 16:36 ` [PATCH 6/6] arm: omap: pm-debug: enhanced usecount debug support Tero Kristo
2012-02-14 16:36 ` Tero Kristo
2012-02-14 20:27 ` Tony Lindgren
2012-02-14 20:27 ` Tony Lindgren
2012-02-14 22:59 ` Kevin Hilman
2012-02-14 22:59 ` Kevin Hilman
2012-02-14 23:52 ` Tony Lindgren
2012-02-14 23:52 ` Tony Lindgren
2012-02-15 8:34 ` Tero Kristo
2012-02-15 8:34 ` Tero Kristo
2012-02-15 15:20 ` Kevin Hilman
2012-02-15 15:20 ` Kevin Hilman
2012-02-16 17:06 ` Menon, Nishanth
2012-02-16 17:06 ` Menon, Nishanth
2012-02-16 17:35 ` Kevin Hilman
2012-02-16 17:35 ` Kevin Hilman
2012-02-16 18:14 ` Menon, Nishanth
2012-02-16 18:14 ` Menon, Nishanth
2012-02-14 20:02 ` [PATCH 0/6] arm: omap: clk/clkdm/pwrdm/voltdm changes to usecounting Kevin Hilman
2012-02-14 20:02 ` 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=8762f96wdk.fsf@ti.com \
--to=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=t-kristo@ti.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.