mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Watchdog support
@ 2010-05-13 10:14 Erwin Rol
  2010-05-14  2:16 ` Marc Reilly
  0 siblings, 1 reply; 6+ messages in thread
From: Erwin Rol @ 2010-05-13 10:14 UTC (permalink / raw)
  To: barebox

Hey All,

does barebox have any watchdog support ?

- Erwin


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Watchdog support
  2010-05-13 10:14 Watchdog support Erwin Rol
@ 2010-05-14  2:16 ` Marc Reilly
  2010-05-14  7:10   ` Erwin Rol
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Reilly @ 2010-05-14  2:16 UTC (permalink / raw)
  To: 'Erwin Rol', barebox

Hi Erwin,

> does barebox have any watchdog support ?

I think the answer to your question is really dependent on what platform you
are using, and exactly what you want the watchdog to do.

Cheers
Marc




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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Watchdog support
  2010-05-14  2:16 ` Marc Reilly
@ 2010-05-14  7:10   ` Erwin Rol
  2010-05-14  8:33     ` Marc Reilly
  2010-05-17  8:36     ` Sascha Hauer
  0 siblings, 2 replies; 6+ messages in thread
From: Erwin Rol @ 2010-05-14  7:10 UTC (permalink / raw)
  To: barebox

Marc Reilly wrote:
> Hi Erwin,
> 
>> does barebox have any watchdog support ?
> 
> I think the answer to your question is really dependent on what platform you
> are using, and exactly what you want the watchdog to do.

Platform does not really matter here, I mean does barebox trigger the 
watchdog if it is doing lengthy operations like writing flash to prevent 
it from being reset in the middle of the operation. That has little to 
do with if the platform has a watchdog or not.

So let me changes the question a bit;

Does barebox have a standard API to trigger and program a watchdog ?

- Erwin


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Watchdog support
  2010-05-14  7:10   ` Erwin Rol
@ 2010-05-14  8:33     ` Marc Reilly
  2010-05-17  8:36     ` Sascha Hauer
  1 sibling, 0 replies; 6+ messages in thread
From: Marc Reilly @ 2010-05-14  8:33 UTC (permalink / raw)
  To: 'Erwin Rol', barebox


> >> does barebox have any watchdog support ?
> >
> > I think the answer to your question is really dependent on what
> > platform you are using, and exactly what you want the watchdog to do.
> 
> Platform does not really matter here, I mean does barebox trigger the
> watchdog if it is doing lengthy operations like writing flash to prevent
it from
> being reset in the middle of the operation. That has little to do with if
the
> platform has a watchdog or not.
> 
> So let me changes the question a bit;
> 
> Does barebox have a standard API to trigger and program a watchdog ?

I'm definitely not an authority on this, but I think not. From a quick scan
the strategy is to disable the wdt if it's going to be a problem. There
seems to be some API to trigger a reset via the wdt, but that's all.
Platform may be an issue because the platform may not implement those
functions.
(Note I didn't look very hard - I invite anyone to correct me).

Cheers
Marc


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Watchdog support
  2010-05-14  7:10   ` Erwin Rol
  2010-05-14  8:33     ` Marc Reilly
@ 2010-05-17  8:36     ` Sascha Hauer
  2010-05-17 10:57       ` Marc Reilly
  1 sibling, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2010-05-17  8:36 UTC (permalink / raw)
  To: Erwin Rol; +Cc: barebox

Hi Erwin,

On Fri, May 14, 2010 at 09:10:49AM +0200, Erwin Rol wrote:
> Marc Reilly wrote:
>> Hi Erwin,
>>
>>> does barebox have any watchdog support ?
>>
>> I think the answer to your question is really dependent on what platform you
>> are using, and exactly what you want the watchdog to do.
>
> Platform does not really matter here, I mean does barebox trigger the  
> watchdog if it is doing lengthy operations like writing flash to prevent  
> it from being reset in the middle of the operation. That has little to  
> do with if the platform has a watchdog or not.
>
> So let me changes the question a bit;
>
> Does barebox have a standard API to trigger and program a watchdog ?

No, we do not have this atm.

Are you looking for real watchdog support, i.e. 'reset watchdog when my
system is in a sane state' or do you have a piece of hardware on which
you have to reset the watchdog frequently because you can't disable it
in software?

For the first case I propose a 'watchdog' command with an underlying
reset_watchdog() function which resets the watchdog.
For the latter case you don't have another choice but to scatter the
code with RESET_WATCHDOG macros like U-Boot does.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Watchdog support
  2010-05-17  8:36     ` Sascha Hauer
@ 2010-05-17 10:57       ` Marc Reilly
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Reilly @ 2010-05-17 10:57 UTC (permalink / raw)
  To: 'Sascha Hauer', 'Erwin Rol'; +Cc: barebox

Hi,

> > Does barebox have a standard API to trigger and program a watchdog ?
> 
> No, we do not have this atm.
> 
> Are you looking for real watchdog support, i.e. 'reset watchdog when my
> system is in a sane state' or do you have a piece of hardware on which you
> have to reset the watchdog frequently because you can't disable it in
> software?
> 
> For the first case I propose a 'watchdog' command with an underlying
> reset_watchdog() function which resets the watchdog.

IMHO the use of 'reset' with watchdogs is ambiguous. Typically, the primary
use is to _prevent_ the watchdog from attacking you (the system resetting),
but sometimes it is also used to _cause_ the reset, so that the system
restarts properly. (suicide and resurrection. I suck at analogies.)
So, that said, I'd suggest watchdog_ping() or watchdog_feed() as functions
for the first usage, and save watchdog_reset() for the second. (or
watchdog_trigger_reset() etc)

Just my 0.02c. In the end, I don't think I'll be the one writing it, so I
won't be the one designing it. :)

> For the latter case you don't have another choice but to scatter the code
with
> RESET_WATCHDOG macros like U-Boot does.

Or put it in the timer interrupt :)
That was, of course, a joke.

Cheers
Marc


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-17 10:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-13 10:14 Watchdog support Erwin Rol
2010-05-14  2:16 ` Marc Reilly
2010-05-14  7:10   ` Erwin Rol
2010-05-14  8:33     ` Marc Reilly
2010-05-17  8:36     ` Sascha Hauer
2010-05-17 10:57       ` Marc Reilly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox