From: Florian Schirmer <jolt@tuxbox.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: obi@saftware.de, carjay@gmx.de,
linux-ppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: [PATCH] m8xx_wdt: software watchdog reset/interrupt select
Date: Thu, 17 Nov 2005 10:13:00 +0100 [thread overview]
Message-ID: <437C499C.6090002@tuxbox.org> (raw)
In-Reply-To: <20051116083609.GC4441@logos.cnet>
Hi,
okay here is what the current driver does:
During startup it installs a timer irq (PIT) handler and sets the
frequency to half of the watchdog timeout. As soon as this timer irq
triggers we reset the watchdog inside the irq handler.
If a userspace handler takes over the watchdog we deinstall the timer
irq handler and let the userspace daemon handle the watchdog resets.
Please not that we're talking about the timer irq, not the watchdog
interrupt.
I don't see why it should make a difference wether the watchdog
generates a IRQ0/HRESET or a system reset directly since it should never
trigger anyway.
All the patch does is to use a kernel timer instead of the hardware
timer. So i'm little confused.
And yes you should be right about the watchdog irq. It doesn't make
sense to install a watchdog irq handler. It doesn't make any sense to
put the watchdog into irq mode. As far as i know nobody ever tried to
use that mode.
If you're bound to irq mode because the bootloader activates it the
whole code should still work out of the box as long as the irq causes a
system reset. But maybe i'm missing something obvious or the docs are
incorrect/incomplete?
Best,
Florian
> Anyway, the SWRI bit selects interrupt (0) or reset mode (1) for the watchdog.
>
> On reset mode no interrupt is sent to the kernel - the watchdog logic resets
> the system with HRESET.
>
> So, the timer in m8xx_wdt is _required_ for reset mode.
>
> Does that make sense?
>
>> Otherwise i'm fine with the patch. Feel free to add my Signed-off-by line.
>
> Ok, lets sort this out first.
>
> I wonder how interrupt mode is supposed to work, because the manual states
> that in interrupt mode (SWRI == 0) an NMI (IRQ0) is triggered, which jumps
> to 0x100 exception vector (SW reset).
>
> Maybe I'm misunderstanding the interrupt mode?
>
> Folks who wrote the patch claim it works on their 8xx's (as can be found
> on mailing list archives).
next prev parent reply other threads:[~2005-11-17 9:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 14:38 [PATCH] m8xx_wdt: software watchdog reset/interrupt select Marcelo Tosatti
2005-11-14 20:55 ` Kumar Gala
2005-11-14 15:57 ` [PATCH] m8xx_wdt: software watchdog reset/interrupt select\ Marcelo Tosatti
2005-11-14 16:03 ` Marcelo Tosatti
2005-11-14 21:14 ` Kumar Gala
2005-11-15 6:11 ` Florian Schirmer
2005-11-15 6:41 ` [PATCH] m8xx_wdt: software watchdog reset/interrupt select Florian Schirmer
2005-11-15 5:42 ` Marcelo Tosatti
2005-11-15 14:21 ` Marcelo Tosatti
2005-11-16 11:47 ` Florian Schirmer
2005-11-16 8:36 ` Marcelo Tosatti
2005-11-17 9:13 ` Florian Schirmer [this message]
2005-11-18 15:36 ` Marcelo Tosatti
2005-11-19 6:16 ` Florian Schirmer
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=437C499C.6090002@tuxbox.org \
--to=jolt@tuxbox.org \
--cc=carjay@gmx.de \
--cc=linuxppc-embedded@ozlabs.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=obi@saftware.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 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).