[U-Boot] [PATCH] arm:kirkwood: Add hardware watchdog support for Marvell Kirkwood boards
Simon Kagstrom
simon.kagstrom at netinsight.net
Tue Sep 29 16:01:33 CEST 2009
On Tue, 29 Sep 2009 06:45:44 -0700
Prafulla Wadaskar <prafulla at marvell.com> wrote:
> > 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.
>
> Its good to have watchdog, it will be very useful for some applications.
> But I don't think we should do it at u-boot level.
> Secondly If it is supported on Kirkwood platforms in Linux,
> then the same can be triggered from OS too.
Sure, it's just nice to have it running when Linux is started, so that
the board is properly rebooted if it hangs during kernel startup. And
in the same way as a watchdog can be useful for other boards, it should
be useful for Kirkwood-based ones.
> In u-boot I didn't find much watchdog implementation for other arm architectures.
Well, you pointed at at91sam9_wdt.c, which I believe is for an ARM :-)
> > 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.
>
> newly added code for Kirkwood may not, we need to check and add
It works fine for me at least. I don't think any of the kirkwood code
has delays of several seconds so far :-). And again, boards which don't
need it or don't want to use it doesn't need to turn the watchdog on -
it will simply be compiled out in that case.
> > > 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.
>
> I think you should follow the same method to keep it as "add Kirkwood watchdog driver"
Sorry, I'm not sure what this comment means. Do you mean to move it out
of timer.c? I put it there since it uses the timer registers and is
really just a special use of the built-in timer support.
// Simon
More information about the U-Boot
mailing list