[U-Boot] [PATCH] arm:kirkwood: Add hardware watchdog support for Marvell Kirkwood boards
Simon Kagstrom
simon.kagstrom at netinsight.net
Wed Oct 28 13:44:22 CET 2009
On Wed, 28 Oct 2009 04:34:10 -0700
Prafulla Wadaskar <prafulla at marvell.com> wrote:
> > #define CNTMR_VAL_REG(tmrnum)
> > &kwtmr_regs->tmr[tmrnum].val
> >
> > and used for the regular timer support. I'm not sure I like that, but
> > at least the file should be internally consistent.
>
> You can update the structure to use WDT timer in the same way as other timers,
> there is no sense putting additional names in structure.
But I'm not - the WDT timer is used in the same way as the other timer.
The only difference is the added WATCHDOG_TMR define which specifies
which Kirkwood timer to use as a watchdog.
> > But then it's unconditionally turned on as soon as the first
> > WATCHDOG_RESET() is called, which might not be what you want.
> >
> > In the long run, we should probably add command line support for
> > enabling the watchdog (some might want to do it just before starting
> > Linux for example).
>
> You can even call WATCHDOG_RESET() from wherever from your code to enable it
Sure, but WATCHDOG_RESET() will be called anyway (and probably before
my code), so it will be enabled anyhow in that case. My point is that
sometimes you don't want the watchdog to get started directly, hence
the function to enable it.
// Simon
More information about the U-Boot
mailing list