linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: pawel.moll@arm.com (Pawel Moll)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: Reset SP804 timer when initialising it as a clock events device
Date: Mon, 24 Jan 2011 16:39:48 +0000	[thread overview]
Message-ID: <1295887188-25924-1-git-send-email-pawel.moll@arm.com> (raw)

The SP804 driver resets relevant timer when initialising it as
a clock source, but it doesn't do this for clock event device.

Fixed.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
 arch/arm/common/timer-sp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 6ef3342..e64cad3 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -142,6 +142,9 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int timer_irq)
 
 	clkevt_base = base;
 
+	/* Reset the timer to prevent spurious interrupts */
+	writel(0, clkevt_base + TIMER_CTRL);
+
 	evt->irq = timer_irq;
 	evt->mult = div_sc(TIMER_FREQ_KHZ, NSEC_PER_MSEC, evt->shift);
 	evt->max_delta_ns = clockevent_delta2ns(0xffffffff, evt);
-- 
1.6.3.3

             reply	other threads:[~2011-01-24 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 16:39 Pawel Moll [this message]
2011-01-24 16:46 ` [PATCH] arm: Reset SP804 timer when initialising it as a clock events device Russell King - ARM Linux

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=1295887188-25924-1-git-send-email-pawel.moll@arm.com \
    --to=pawel.moll@arm.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).