[U-Boot] [PATCH] at91: Don't initialize watchdog if CONFIG_SYS_WDTC_WDMR_VAL is undefined
Wolfgang Denk
wd at denx.de
Thu Jul 22 09:09:12 CEST 2010
Dear Alexander Stein,
In message <201007220817.17441.alexander.stein at systec-electronic.com> you wrote:
>
> > This seems the wrong approach to me - when CONFIG_HW_WATCHDOG is
> > defined and requires CONFIG_SYS_WDTC_WDMR_VAL, but the latter is
> > missing, than this should raise n error condition. We must not
> > silently ignore errors.
>
> Well, my problem is, that CONFIG_SYS_WDTC_WDMR_VAL is used to program the
> internal watchdog. But this watchdog can only be programmed once until a reset
> occurs. So there is no possibility for linux to reprogram it.
This is normal. Any watchdog that is worth the name will behave
similar.
> So, if CONFIG_SYS_WDTC_WDMR_VAL is not defined and the watchdog is not
> programed using my patch, the watchdog still runs with default settings
> (timeout of 16s). So a user may choose to trigger the watchdog from u-boot
> (define CONFIG_AT91SAM9_WATCHDOG and CONFIG_HW_WATCHDOG) or let it run
> silently. To summarize, CONFIG_SYS_WDTC_WDMR_VAL is not needed to use
> CONFIG_AT91SAM9_WATCHDOG and CONFIG_HW_WATCHDOG.
Then the subject is misleading - it suggests you do not initialize /
let run the watchdog at all if CONFIG_SYS_WDTC_WDMR_VAL is undefined.
I think we should make sure that everything is in a sane and
consistent state - if CONFIG_HW_WATCHDOG (and
CONFIG_AT91SAM9_WATCHDOG) are set, this indicates that U-Boot is
supposed to use the watchdog, which in turn means they should
initialize it.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An optimist believes we live in the best world possible; a pessimist
fears this is true.
More information about the U-Boot
mailing list