All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: <wim@linux-watchdog.org>, <linux@roeck-us.net>,
	<linux-watchdog@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCHv2 2/4] watchdog: reset last_hw_keepalive time at start
Date: Mon, 2 Mar 2020 22:04:24 +0200	[thread overview]
Message-ID: <20200302200426.6492-3-t-kristo@ti.com> (raw)
In-Reply-To: <20200302200426.6492-1-t-kristo@ti.com>

Currently the watchdog core does not initialize the last_hw_keepalive
time during watchdog startup. This will cause the watchdog to be pinged
immediately if enough time has passed from the system boot-up time, and
some types of watchdogs like K3 RTI does not like this.

To avoid the issue, setup the last_hw_keepalive time during watchdog
startup.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
v2:
  * apply functionality always instead of being behind a flag

 drivers/watchdog/watchdog_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 8b5c742f24e8..7e4cd34a8c20 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -282,6 +282,7 @@ static int watchdog_start(struct watchdog_device *wdd)
 	if (err == 0) {
 		set_bit(WDOG_ACTIVE, &wdd->status);
 		wd_data->last_keepalive = started_at;
+		wd_data->last_hw_keepalive = started_at;
 		watchdog_update_worker(wdd);
 	}
 
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  parent reply	other threads:[~2020-03-02 20:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 20:04 [PATCHv2 0/4] watchdog: add TI K3 SoC watchdog support Tero Kristo
2020-03-02 20:04 ` [PATCHv2 1/4] dt-bindings: watchdog: Add support for TI K3 RTI watchdog Tero Kristo
2020-03-10 19:37   ` Rob Herring
2020-03-11  7:48     ` Tero Kristo
2020-03-02 20:04 ` Tero Kristo [this message]
2020-03-03 21:12   ` [PATCHv2 2/4] watchdog: reset last_hw_keepalive time at start Guenter Roeck
2020-03-02 20:04 ` [PATCHv2 3/4] watchdog: Add K3 RTI watchdog support Tero Kristo
2020-03-03 21:18   ` Guenter Roeck
2020-03-04  6:57     ` Tero Kristo
2020-03-04  9:23       ` Guenter Roeck
2020-03-04 10:42         ` [PATCHv3 " Tero Kristo
2020-03-04 22:06           ` Guenter Roeck
2020-04-01 12:44             ` Tero Kristo
2020-04-01 15:55               ` Guenter Roeck
2020-04-01 17:01                 ` Tero Kristo
2020-03-04 10:44         ` [PATCHv2 " Tero Kristo
2020-03-02 20:04 ` [PATCHv2 4/4] arm64: dts: ti: k3-j721e-main: Add MAIN domain watchdog entries Tero Kristo

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=20200302200426.6492-3-t-kristo@ti.com \
    --to=t-kristo@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.