[U-Boot] [PATCH] arm:kirkwood: Add hardware watchdog support for Marvell Kirkwood boards
Simon Kagstrom
simon.kagstrom at netinsight.net
Tue Sep 29 10:28:46 CEST 2009
On Mon, 28 Sep 2009 19:16:16 -0700
Prafulla Wadaskar <prafulla at marvell.com> wrote:
> But do you really need Watchdog support for u-boot?
Paranoia really has no limits :-). The main objective for me personally
is to have the watchdog on when Linux starts, but if there is a risk
(for whatever reason) that U-boot hangs, it would also help there.
> Because if you want to use the watchdog, you will need to keep it running in
> Entire code.
That's fine, the code is already sprinkled with WATCHDOG_RESET() in
many places (which calls hw_watchdog_reset()). Also note that this
patch doesn't actually turn it on, you'll have to call
kw_watchdog_init() first to do that.
> Secondly Pls have a look at drivers/watchdog/at91sam9_wdt.c and its implementation,
> This will be a good way of implementation.
Well, I did look at that, and I believe the implementation is fairly
similar.
What I wonder about in that context is the use of hw_watchdog_init(). I
first thought this was generic, but it's not exported via watchdog.h
(like hw_watchdog_reset()). I think it would be nice to have a generic
interface which exports
void hw_watchdog_init(unsigned long timeout_ms);
to initialize the watchdog and timeout. The timeout would be a bit
crude since hardware have limits to how long the timeouts would be, but
anyway.
Another good feature would be a command-line interface to turn it on
and configure it, i.e., something like
watchdog on 5000 # Set timeout to 5000 ms
watchdog off # Turn off (if possible)
// Simon
More information about the U-Boot
mailing list