public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] at91: Don't initialize watchdog if CONFIG_SYS_WDTC_WDMR_VAL is undefined
Date: Thu, 22 Jul 2010 09:24:51 +0200	[thread overview]
Message-ID: <201007220924.51614.alexander.stein@systec-electronic.com> (raw)
In-Reply-To: <20100722070912.8A943153780@gemini.denx.de>

Dear Wolfgang Denk,

Am Donnerstag, 22. Juli 2010, 09:09:12 schrieb Wolfgang Denk:
> > 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.

Well, I encountered several watchdog which start only after the first trigger.

> > 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.

Ok, maybe the subject need some rework.

> 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.

Of course, if CONFIG_HW_WATCHDOG and CONFIG_AT91SAM9_WATCHDOG is set, u-boot 
should use/trigger the watchdog. But (re-)programming the watchdog on AT91 is 
not _always_ necessary. Without programming (using CONFIG_SYS_WDTC_WDMR_VAL), 
the watchdog just runs with default settings, allowing e.g. Linux to reprogram 
it later.
This patch allows to program the watchdog from u-boot, if wanted, but also 
allows to reprogram it later from Linux. While triggering the watchdog from u-
boot itself does still work, wrt. the default watchdog settings.

Best regards,
Alexander Stein

  reply	other threads:[~2010-07-22  7:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 12:01 [U-Boot] [PATCH] at91: Don't initialize watchdog if CONFIG_SYS_WDTC_WDMR_VAL is undefined Alexander Stein
2010-07-21 18:20 ` Wolfgang Denk
2010-07-22  6:17   ` Alexander Stein
2010-07-22  7:09     ` Wolfgang Denk
2010-07-22  7:24       ` Alexander Stein [this message]
2010-07-22 13:53         ` Wolfgang Denk
2010-07-26  6:11           ` Alexander Stein
     [not found]           ` <201007260810.47268.alexander.stein@systec-electronic.com>
2010-07-26  9:01             ` Wolfgang Denk
2010-07-26  9:34               ` [U-Boot] [PATCH v2] at91: Don't initialize watchdog if CONFIG_SKIP_WATCHDOG_INIT " Alexander Stein
2010-07-26 10:49                 ` Wolfgang Denk
2010-07-26 12:03                   ` [U-Boot] [PATCH v3] " Alexander Stein
2010-08-08 22:59                     ` Wolfgang Denk
2010-08-09  6:40                       ` [U-Boot] [PATCH v4] at91: Don't initialize watchdog if CONFIG_SKIP_WATCHDOG_INIT is defined Alexander Stein
2010-08-09  7:13                         ` Mike Frysinger
2010-08-09 11:42                           ` Alexander Stein
2010-08-14  6:29                             ` Mike Frysinger
2010-08-20 12:31                               ` Reinhard Meyer
2010-08-20 17:10                                 ` Mike Frysinger
2010-08-20 20:05                                   ` Reinhard Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201007220924.51614.alexander.stein@systec-electronic.com \
    --to=alexander.stein@systec-electronic.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox