linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: 王擎 <wangqing@vivo.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] watchdog: mtk: support pre-timeout when the bark irq is available
Date: Thu, 15 Apr 2021 06:29:09 -0700	[thread overview]
Message-ID: <7555c705-a12d-5d51-3881-68feb5d078c1@roeck-us.net> (raw)
In-Reply-To: <AAgApgCdDjCicbWFGpPmeaor.3.1618479605424.Hmail.wangqing@vivo.com>

On 4/15/21 2:40 AM, 王擎 wrote:

> 
> Yes, as mentioned before, the behavior of WDT_MODE_IRQ_EN is use irq instead of
> reset, so we must use WDT_MODE_IRQ_EN | WDT_MODE_DUAL_EN if like you said
> "the first time generating an interrupt and the second time resetting the system" . 
> 
> The Dual mode is mentioned in the MTK datasheet:
> In this mode, the watchdog will be AUTO-RESTART after interrupt is triggered. 
> AP need to clear WDT_STA after receiving interrupt from TOPRGU, or system reset
> will be triggered after watchdog timer expires.
> Instructions for use:
> Set wdt_en = 1'b1.
> Set dual_mode = 1'b1.
> Set wdt_irq = 1'b1.
> 
> We can use Dual mode to achieve pretimeout behavior, only in this way can we
> get more information during pretimeout processing, instead of directly resetting.
> 

If so, the pretimeout would always be half of the full timeout, and the timeout
to configure would be timeout / 2. The code would have to adjust the pretimeout
time accordingly. Also, to avoid unexpected and changed behavior, the prefimeout
should by default be disabled.

Guenter



      reply	other threads:[~2021-04-15 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 11:48 [PATCH V3] watchdog: mtk: support pre-timeout when the bark irq is available Wang Qing
2021-04-14 12:13 ` Guenter Roeck
2021-04-15  9:40   ` 王擎
2021-04-15 13:29     ` Guenter Roeck [this message]

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=7555c705-a12d-5d51-3881-68feb5d078c1@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=wangqing@vivo.com \
    --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).