All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP: DMTIMER: Ack pending interrupt always when stopping a timer
Date: Tue, 25 May 2010 09:10:57 -0700	[thread overview]
Message-ID: <87d3wkner2.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1274797036-21107-1-git-send-email-tero.kristo@nokia.com> (Tero Kristo's message of "Tue\, 25 May 2010 17\:17\:16 +0300")

Tero Kristo <tero.kristo@nokia.com> writes:

> From: Tero Kristo <tero.kristo@nokia.com>
>
> The kernel timer queue is being run currently from a GP timer running in a one
> shot mode, which works in a way that when it expires, it will also stop.
> Usually during this situation, the interrupt handler will ack the interrupt,
> load a new value to the timer and start it again. During suspend, the
> situation is slightly different, as we disable interrupts just before
> timekeeping is suspended, which leaves a small window where the timer can
> expire before it is stopped, and will leave the interrupt flag pending.
> This pending interrupt will prevent ARM sleep entry, thus now we ack it always
> when we are attempting to stop a timer.
>
> Signed-off-by: Tero Kristo <tero.kristo@nokia.com>

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

> ---
>  arch/arm/plat-omap/dmtimer.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index c64875f..023d664 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -541,11 +541,13 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer)
>  		  * timer is stopped
>  		  */
>  		udelay(3500000 / clk_get_rate(timer->fclk) + 1);
> -		/* Ack possibly pending interrupt */
> -		omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG,
> -				OMAP_TIMER_INT_OVERFLOW);
>  #endif
>  	}
> +#ifdef CONFIG_ARCH_OMAP2PLUS
> +	/* Ack possibly pending interrupt */
> +	omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG,
> +			OMAP_TIMER_INT_OVERFLOW);
> +#endif
>  }
>  EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
>  
> -- 
> 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

  reply	other threads:[~2010-05-25 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 14:17 [PATCH] OMAP: DMTIMER: Ack pending interrupt always when stopping a timer Tero Kristo
2010-05-25 16:10 ` Kevin Hilman [this message]
2010-06-01  7:40   ` Tony Lindgren

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=87d3wkner2.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 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.