public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: "Calin A. Culianu" <calin@ajvar.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SBC: Winsystems EPX-C3 Watchdog Timer?
Date: Fri, 13 Jan 2006 06:37:06 +0100	[thread overview]
Message-ID: <20060113053706.GL7142@w.ods.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0601122044190.9231@rtlab.med.cornell.edu>

Hi,

On Thu, Jan 12, 2006 at 08:48:43PM -0500, Calin A. Culianu wrote:
> 
> Hi,
> 
> I wanted to see if a driver for the watchdog timer built into the 
> Winsystems EPX-C3 SBC board is something the linux kernel people are 
> interested in.  If so, how should I structure the driver if I were to 
> submit it?
> 
> The reason I ask is that this board's watchdog is pretty basic/primitive. 
> It is not a PCI device, it doesn't have any status registers per se and 
> is configured by jumpers on the board only.
> 
> Behavior of the watchdog (if configured):
> 
> Enable the watchdog:  Write a 1 to io address: 0x1EE
> Pet the watchdog before the timeout period (1.5s or 200s depending on 
> jumper config): Write any value to io address: 0x1EF
> Disable the watchdog: Write a 0 to io address: 0x1EE.
> 
> Pretty basic huh?  As such -- there is no way to tell in software if the 
> watchdog exists, if it is enabled, or how long the timeout is.  Since 
> this is so basic.. does it belong in the mainline kernel?  Or should it 
> best be done as a userspace program instead?

Most of a watchdog's intelligence should be in userspace. However,
it's interesting to put the basic watchdog driver in kernel so that
you have the choice to use any watchdog daemon which will ping
/dev/watchdog. So I think that basically, your driver should turn
any write to /dev/watchdog into a write to 0x1EF.

Now about your concern that there's no way to detect the presence
of the hardware, well, it's already a problem with most such hardware.
I think you don't have to worry about that. Just put a big config
warning, put a message at startup reminding that it will write to
0x1EE and 0x1EF, and that's all.

> Any guidance is appreciated..
> 
> -Calin

Willy


      reply	other threads:[~2006-01-13  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13  1:48 SBC: Winsystems EPX-C3 Watchdog Timer? Calin A. Culianu
2006-01-13  5:37 ` Willy Tarreau [this message]

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=20060113053706.GL7142@w.ods.org \
    --to=willy@w.ods.org \
    --cc=calin@ajvar.org \
    --cc=linux-kernel@vger.kernel.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