All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Joel Stanley" <joel@jms.id.au>,
	"Guenter Roeck" <linux@roeck-us.net>
Subject: [PATCH 2/3 v2] clocksource/drivers/fttmr010: Clear also overflow bit on AST2600
Date: Wed, 22 Sep 2021 21:56:55 +0200	[thread overview]
Message-ID: <20210922195656.1822268-2-linus.walleij@linaro.org> (raw)
In-Reply-To: <20210922195656.1822268-1-linus.walleij@linaro.org>

The code was originally just writing 0x1 into TIMER_INTR_STATE
on the AST2600. But that is just the bit for TIMER_1_INT_MATCH1
so if we're using periodic IRQs we also need to clear
TIMER_1_INT_OVERFLOW.

Cc: Cédric Le Goater <clg@kaod.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Resending with the other patches.
---
 drivers/clocksource/timer-fttmr010.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-fttmr010.c b/drivers/clocksource/timer-fttmr010.c
index f47099dda96b..5af8ea388cc4 100644
--- a/drivers/clocksource/timer-fttmr010.c
+++ b/drivers/clocksource/timer-fttmr010.c
@@ -285,7 +285,8 @@ static irqreturn_t ast2600_timer_interrupt(int irq, void *dev_id)
 
 	val = readl(fttmr010->base + TIMER_INTR_STATE);
 	if (val & (TIMER_1_INT_MATCH1 | TIMER_1_INT_OVERFLOW)) {
-		writel(TIMER_1_INT_MATCH1, fttmr010->base + TIMER_INTR_STATE);
+		writel(TIMER_1_INT_MATCH1 | TIMER_1_INT_OVERFLOW,
+		       fttmr010->base + TIMER_INTR_STATE);
 		evt->event_handler(evt);
 	} else {
 		/* Just clear any spurious IRQs from the block */
-- 
2.31.1


  reply	other threads:[~2021-09-22 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 19:56 [PATCH 1/3 v2] clocksource/drivers/fttmr010: Be stricter on IRQs Linus Walleij
2021-09-22 19:56 ` Linus Walleij [this message]
2021-09-22 19:56 ` [PATCH 3/3 v2] clocksource/drivers/fttmr010: Just count down Linus Walleij
2021-09-23 20:11 ` [PATCH 1/3 v2] clocksource/drivers/fttmr010: Be stricter on IRQs Cédric Le Goater
2021-09-23 21:05   ` Linus Walleij
2021-09-24 13:56     ` Cédric Le Goater

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=20210922195656.1822268-2-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=clg@kaod.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tglx@linutronix.de \
    /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.