linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Pavone <pavone@retrodev.com>
To: linux-m68k@lists.linux-m68k.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] m68k/mvme16x: Fix timer interrupts
Date: Tue, 16 Mar 2021 21:25:23 -0700	[thread overview]
Message-ID: <628cb0d0-94af-651f-0d84-f78b966cd8bd@retrodev.com> (raw)

Timer interrupts on MVME16x and MVME17x boards are broken as the CEN and
COC bits are being inadvertently cleared when clearing the overflow
counter. This results in no timer interrupts being delivered after the
first. Initialization then hangs in calibrate_delay as the jiffies counter
is not updated. OR with current register value to preserve these bits.

Fixes: 19999a8b8782 ("m68k: mvme16x: Handle timer counter overflow")
Signed-off-by: Michael Pavone <pavone@retrodev.com>
---
  arch/m68k/mvme16x/config.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index 30357fe4ba6c..949d3e19f79c 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -375,7 +375,7 @@ static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
  
  	local_irq_save(flags);
  	out_8(PCCTIC1, in_8(PCCTIC1) | PCCTIC1_INT_CLR);
-	out_8(PCCTOVR1, PCCTOVR1_OVR_CLR);
+	out_8(PCCTOVR1, in_8(PCCTOVR1) | PCCTOVR1_OVR_CLR);
  	clk_total += PCC_TIMER_CYCLES;
  	legacy_timer_tick(1);
  	local_irq_restore(flags);


             reply	other threads:[~2021-03-17  4:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  4:25 Mike Pavone [this message]
2021-03-18  3:05 ` [PATCH] m68k/mvme16x: Fix timer interrupts Finn Thain
2021-03-18  7:23   ` Michael Pavone
2021-03-19  6:35     ` Finn Thain
2021-03-19  7:07 ` Finn Thain
2021-03-19 19:33   ` Michael Pavone

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=628cb0d0-94af-651f-0d84-f78b966cd8bd@retrodev.com \
    --to=pavone@retrodev.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-m68k@lists.linux-m68k.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).