From: Gregory Oakes <gregory.oakes@amd.com>
To: <linux-watchdog@vger.kernel.org>
Cc: <terry.bowman@amd.com>, Gregory Oakes <gregory.oakes@amd.com>
Subject: [PATCH v2] watchdog: sp5100_tco: Immediately trigger upon starting.
Date: Thu, 16 Mar 2023 15:13:12 -0500 [thread overview]
Message-ID: <20230316201312.17538-1-gregory.oakes@amd.com> (raw)
The watchdog countdown is supposed to begin when the device file is
opened. Instead, it would begin countdown upon the first write to or
close of the device file. Now, the ping operation is called within the
start operation which ensures the countdown begins. From experimenation,
it does not appear possible to do this with a single write including
both the start bit and the trigger bit. So, it is done as two distinct
writes.
Signed-off-by: Gregory Oakes <gregory.oakes@amd.com>
---
drivers/watchdog/sp5100_tco.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
index fb426b7d81da..14f8d8d90920 100644
--- a/drivers/watchdog/sp5100_tco.c
+++ b/drivers/watchdog/sp5100_tco.c
@@ -115,6 +115,10 @@ static int tco_timer_start(struct watchdog_device *wdd)
val |= SP5100_WDT_START_STOP_BIT;
writel(val, SP5100_WDT_CONTROL(tco->tcobase));
+ /* This must be a distinct write. */
+ val |= SP5100_WDT_TRIGGER_BIT;
+ writel(val, SP5100_WDT_CONTROL(tco->tcobase));
+
return 0;
}
--
2.39.1
next reply other threads:[~2023-03-16 20:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 20:13 Gregory Oakes [this message]
2023-03-16 23:08 ` [PATCH v2] watchdog: sp5100_tco: Immediately trigger upon starting 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=20230316201312.17538-1-gregory.oakes@amd.com \
--to=gregory.oakes@amd.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=terry.bowman@amd.com \
/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.