linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [REPOST PATCH] ARM: sunxi: stop timer from ticking before enabling interrupts
Date: Mon, 2 Dec 2013 11:49:08 +0100	[thread overview]
Message-ID: <20131202104908.GC3034@lukather> (raw)
In-Reply-To: <529C61A3.8010208@linaro.org>

Hi Daniel,

On Mon, Dec 02, 2013 at 11:32:03AM +0100, Daniel Lezcano wrote:
>>+	/* Make sure timer is stopped before playing with interrupts */
>>+	sun4i_clkevt_time_stop(0);
>>+
> 
> It isn't possible to *not* enable it instead of stopping it ?
> 
> In the code before we have:
> 
>         writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD |
>                TIMER_CTL_CLK_SRC(TIMER_CTL_CLK_SRC_OSC24M),
>                timer_base + TIMER_CTL_REG(1));
> 
> If we remove the TIMER_CTL_ENABLE flag, wouldn't it fix the issue ?

Actually, this excerpt enables the timer 1, that is used as a
clocksource, while Marc stops the timer 0, which is used as our clock
event.

The timer 0 is enabled only whenever either .set_mode or
.set_next_event is called.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131202/490fefcf/attachment.sig>

  parent reply	other threads:[~2013-12-02 10:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02  9:29 [REPOST PATCH] ARM: sunxi: stop timer from ticking before enabling interrupts Marc Zyngier
2013-12-02 10:32 ` Daniel Lezcano
2013-12-02 10:46   ` Marc Zyngier
2013-12-02 10:49   ` Maxime Ripard [this message]
2013-12-02 11:57 ` Daniel Lezcano

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=20131202104908.GC3034@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).