All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/3] PM: Skip PER previous state register read
Date: Fri, 30 Oct 2009 09:31:38 -0700	[thread overview]
Message-ID: <87k4ycrggl.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1256125881-12441-3-git-send-email-kalle.jokiniemi@digia.com> (Kalle Jokiniemi's message of "Wed\, 21 Oct 2009 14\:51\:20 +0300")

Kalle Jokiniemi <kalle.jokiniemi@digia.com> writes:

> According to measurements, reading the previous state of PER
> domain after wfi takes ~11us on OPP2.
>
> Removed this unneccessary latency from cases where we know
> PER power domain did not try to enter off mode.
>
> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com>

Looks good, pulling into PM branch.

But still amazed at such a *huge* latency to read that register.

Kevin

> ---
>  arch/arm/mach-omap2/pm34xx.c |   19 +++++++++++++------
>  1 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 237c819..b70ea19 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -489,12 +489,19 @@ void omap_sram_idle(void)
>  
>  	/* PER */
>  	if (per_next_state < PWRDM_POWER_ON) {
> -		per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
> -		if (per_prev_state == PWRDM_POWER_OFF) {
> -			omap3_per_restore_context();
> -			omap3_gpio_restore_pad_context(0);
> -		} else if (per_next_state == PWRDM_POWER_OFF)
> -			omap3_gpio_restore_pad_context(1);
> +		if (per_next_state == PWRDM_POWER_OFF) {
> +			/*
> +			 * Reading the prev-state takes long time (11us@OPP2),
> +			 * only do it, if we really tried to put PER in OFF
> +			 */
> +			per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
> +			if (per_prev_state == PWRDM_POWER_OFF) {
> +				omap3_per_restore_context();
> +				omap3_gpio_restore_pad_context(0);
> +			} else if (per_next_state == PWRDM_POWER_OFF) {
> +				omap3_gpio_restore_pad_context(1);
> +			}
> +		}
>  		omap2_gpio_resume_after_idle();
>  		omap_uart_resume_idle(2);
>  		if (per_state_modified)
> -- 
> 1.5.4.3

  parent reply	other threads:[~2009-10-30 16:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 11:51 [PATCH 0/3] PM: Misc latency fixes Kalle Jokiniemi
2009-10-21 11:51 ` [PATCH 1/3] OMAP3: Only update pm-counters when needed Kalle Jokiniemi
2009-10-21 11:51   ` [PATCH 2/3] PM: Skip PER previous state register read Kalle Jokiniemi
2009-10-21 11:51     ` [PATCH V4 3/3] OMAP: I2C: Add mpu wake up latency constraint in i2c Kalle Jokiniemi
2009-10-23 15:53       ` Sonasath, Moiz
2009-10-29  8:55         ` Kalle Jokiniemi
2009-11-20  8:35           ` kalle.jokiniemi
2009-11-20 16:28             ` Kevin Hilman
2009-11-23  7:35               ` kalle.jokiniemi
     [not found]         ` <1256644921.6751.61.camel@ubuntu>
2009-11-23 16:10           ` Sonasath, Moiz
2009-11-24 15:19             ` kalle.jokiniemi
2009-11-24 15:54               ` Kevin Hilman
2009-10-30 16:31     ` Kevin Hilman [this message]
2009-11-06  7:52       ` [PATCH 2/3] PM: Skip PER previous state register read kalle.jokiniemi
2009-10-29 23:07   ` [PATCH 1/3] OMAP3: Only update pm-counters when needed Kevin Hilman
2009-10-30  9:06     ` Kalle Jokiniemi
2009-10-29 10:15 ` [PATCH 0/3] PM: Misc latency fixes Kalle Jokiniemi

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=87k4ycrggl.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=kalle.jokiniemi@digia.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 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.