From: Jamie Iles <jamie@jamieiles.com>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: Jamie Iles <jamie@jamieiles.com>,
Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
nios2-dev@sopc.et.ntust.edu.tw
Subject: Re: [PATCH] watchdog: Add driver for Altera Watchdog Timer
Date: Wed, 12 Jan 2011 12:43:54 +0000 [thread overview]
Message-ID: <20110112124353.GE2658@pulham.picochip.com> (raw)
In-Reply-To: <20110112123637.GT29757@distanz.ch>
On Wed, Jan 12, 2011 at 01:36:37PM +0100, Tobias Klauser wrote:
[...]
> > > +static long altera_wdt_ioctl(struct file *file, unsigned int cmd,
> > > + unsigned long arg)
> > > +{
> > > + struct altera_wdt_dev *wdev = file->private_data;
> > > + void __user *argp = (void __user *) arg;
> > > +
> > > + switch (cmd) {
> > > + case WDIOC_GETSUPPORT:
> > > + return copy_to_user(argp, &altera_wdt_info, sizeof(altera_wdt_info));
> > > + case WDIOC_KEEPALIVE:
> > > + altera_wdt_ping(wdev);
> > > + return 0;
> > > + default:
> > > + return -ENOTTY;
> > > + }
> > > +}
> >
> > Can you set/get the timeout period on this watchdog? Even if you can't
> > set it then it would be good to allow the user to read the constant
> > timeout that the watchdog uses so it knows how often to kick it. If you
> > use the software timeout heartbeat then in the future you could emulate
> > longer timeouts.
>
> This is a very primitive watchdog timer which does only allow the
> timeout period to be set when instantiating the timer in the FPGA, so
> from a software point-of-view the timer has a fixed timeout. It doesn't
> even allow to read the timeout value directly from the "hardware".
>
> But we could use the additional information (including the timeout value
> among a lot of other configurable values) generated when building the
> FPGA firmware and store that in the device tree (support for device tree
> was recently added to the Nios2 Linux port). So we could get it (and
> the base address) from there in the altera_wdt driver. Does that sound
> reasonable?
That sounds like a very good idea to me. I can see that allowing
userspace to know the timeout period would be useful.
Jamie
next prev parent reply other threads:[~2011-01-12 12:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 10:43 Tobias Klauser
2011-01-12 11:48 ` Jamie Iles
2011-01-12 12:36 ` Tobias Klauser
2011-01-12 12:43 ` Jamie Iles [this message]
2011-02-08 13:22 ` [PATCH v2] " Tobias Klauser
2011-02-08 17:13 ` Jamie Iles
2011-02-08 22:54 ` [Nios2-dev] " Walter Goossens
2011-02-09 7:19 ` [PATCH v3] " Tobias Klauser
2011-02-09 7:56 ` Belisko Marek
2011-02-09 8:15 ` Tobias Klauser
2011-02-12 9:42 ` Grant Likely
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=20110112124353.GE2658@pulham.picochip.com \
--to=jamie@jamieiles.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=nios2-dev@sopc.et.ntust.edu.tw \
--cc=tklauser@distanz.ch \
--cc=wim@iguana.be \
/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
all inboxes | Powered by JetHome®