mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/7] watchdog: add keep alive support
Date: Mon, 19 Nov 2012 11:08:02 +0100	[thread overview]
Message-ID: <20121119100802.GI8327@game.jcrosoft.org> (raw)
In-Reply-To: <20121119093844.GJ10369@pengutronix.de>

On 10:38 Mon 19 Nov     , Sascha Hauer wrote:
> 
> On Fri, Nov 16, 2012 at 06:55:39PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > this will allow to ping the watchdog via poller
> > 
> >  /*
> >   * Note: this simple framework supports one watchdog only.
> >   */
> >  static struct watchdog *watchdog;
> >  
> > +static void watchdog_poller_func(struct poller_struct *poller)
> > +{
> > +	watchdog->keep_alive(watchdog);
> > +}
> > +
> > +static struct poller_struct watchdog_poller = {
> > +	.func = watchdog_poller_func,
> > +};
> > +
> >  int watchdog_register(struct watchdog *wd)
> >  {
> >  	if (watchdog != NULL)
> >  		return -EBUSY;
> >  
> >  	watchdog = wd;
> > +
> > +	if (watchdog->keep_alive) {
> > +		int ret;
> > +
> > +		ret = poller_register(&watchdog_poller);
> > +		if (ret) {
> > +			watchdog = NULL;
> > +			return ret;
> > +		}
> > +	}
> 
> Currently the watchdog is supposed to be kept alive with periodically
> calling the watchdog (or wd) command. A user may decide to just
> periodically ping the watchdog from C code, but this should be a users
> decision (i.e. some enhancement to the wd command) and should be
> available for i.MX aswell.

no this is broken

this should be completly automatic I agree that the user need to control it

we are not going to add 100s of call in barebox for this

like did U-Boot

Barebox need to ping the wtach automticly via poler
and manage soft timeout

as some watchdog have short timeout so this will make the soft tiemout (user
timeout) hw indepedant as in linux

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-11-19 10:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 17:53 [PATCH 0/7 v2] at91sam9 add watchdog support with keep alive Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55 ` [PATCH 1/7] watchdog: add keep alive support Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55   ` [PATCH 2/7] watchdog: add at91sam9 watchdog support Jean-Christophe PLAGNIOL-VILLARD
2012-11-19  9:36     ` Sascha Hauer
2012-11-19  9:59       ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55   ` [PATCH 3/7] at91sam9260/9g20: add wathdog support Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55   ` [PATCH 4/7] at91sam9261/9g10: " Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55   ` [PATCH 5/7] at91sam9263: " Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55   ` [PATCH 6/7] at91sam9g45: " Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:55   ` [PATCH 7/7] at91sam9x5: " Jean-Christophe PLAGNIOL-VILLARD
2012-11-19  9:38   ` [PATCH 1/7] watchdog: add keep alive support Sascha Hauer
2012-11-19 10:08     ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-17  9:36 ` [PATCH 0/7 v2] at91sam9 add watchdog support with keep alive Fabio Porcedda
  -- strict thread matches above, loose matches on Subject: below --
2012-11-16 16:57 [PATCH 0/7] " Jean-Christophe PLAGNIOL-VILLARD
2012-11-16 17:02 ` [PATCH 1/7] watchdog: add keep alive support Jean-Christophe PLAGNIOL-VILLARD

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=20121119100802.GI8327@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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