linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Suniel Mahesh <sunil.m@techveda.org>
Cc: kgene@kernel.org, wim@linux-watchdog.org, linux@roeck-us.net,
	heiko@sntech.de,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	linux-watchdog@vger.kernel.org
Subject: Re: Samsung based S3C2440A chipset - watchdog timer issue
Date: Thu, 19 Sep 2019 10:38:16 +0200	[thread overview]
Message-ID: <CAJKOXPdoYZTr_4ysVxN17bo8FZzQXRJS=ch4BAZzY+bLsLhS9Q@mail.gmail.com> (raw)
In-Reply-To: <652bf0b2-3681-47f2-3b50-40edff52a7b5@techveda.org>

On Thu, 19 Sep 2019 at 09:40, Suniel Mahesh <sunil.m@techveda.org> wrote:
>
> Hi,
>
> I am working on one of the Samsung based S3C2440A chipset based target .
>
> I have couple of questions and I request someone to shed some light on these: (Thank you)
>
> The watchdog driver in linux, looks like, it just configured WDT but didn't start it (code snippet included below).
>
> May i know the reasson why WDT is not started ? Is it because u-boot already started WDT, implies it is not required to do the
> same once we jump into linux ? or is there any specific reason ?
>
> drivers/watchdog/s3c2410_wdt.c (line 53 and lines 616 - 625)
>
> #define S3C2410_WATCHDOG_ATBOOT         (0)
> ....
> static int tmr_atboot   = S3C2410_WATCHDOG_ATBOOT;
> ...
> ...
> if (tmr_atboot && started == 0) {
>                 dev_info(dev, "starting watchdog timer\n");
>                 s3c2410wdt_start(&wdt->wdt_device);
>         } else if (!tmr_atboot) {
>                 /* if we're not enabling the watchdog, then ensure it is
>                  * disabled if it has been left running from the bootloader
>                  * or other source */
>
>                 s3c2410wdt_stop(&wdt->wdt_device);
>         }
> ...
> ...
>
> Tried to start WDT in linux by assigning value 1 to S3C2410_WATCHDOG_ATBOOT. The target resets.
>
> please comment.

I think watchdog should not start during boot before user-space is
brought up. Otherwise who will ping it? Usually watchdog is started by
opening the watchdog device by user-space. If you need it to be
running without user-space, there are special flags for this (see
WDOG_HW_RUNNING and others).

Best regards,
Krzysztof

  reply	other threads:[~2019-09-19  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19  7:40 Samsung based S3C2440A chipset - watchdog timer issue Suniel Mahesh
2019-09-19  8:38 ` Krzysztof Kozlowski [this message]
2019-09-19 13:26   ` Guenter Roeck
2019-09-19 13:21 ` Guenter Roeck

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='CAJKOXPdoYZTr_4ysVxN17bo8FZzQXRJS=ch4BAZzY+bLsLhS9Q@mail.gmail.com' \
    --to=krzk@kernel.org \
    --cc=heiko@sntech.de \
    --cc=kgene@kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=sunil.m@techveda.org \
    --cc=wim@linux-watchdog.org \
    /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;
as well as URLs for NNTP newsgroup(s).