From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/2] watchdog: imxulp: Fix timeout calculation
Date: Mon, 15 Jan 2024 16:56:14 +0100 [thread overview]
Message-ID: <20240115155615.953954-1-s.hauer@pengutronix.de> (raw)
On i.MX93 the 32k clock runs at 32768Hz. Together with the /256
prescaler the watchdog timer advances 32768/256 = 128 ticks per
second, not 125.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/watchdog/imxulp-wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/imxulp-wdt.c b/drivers/watchdog/imxulp-wdt.c
index 78d1527782..84d558b812 100644
--- a/drivers/watchdog/imxulp-wdt.c
+++ b/drivers/watchdog/imxulp-wdt.c
@@ -50,7 +50,7 @@ struct imxulp_wd {
#define WDOG_TOVAL 0x8
#define CLK_RATE_1KHZ 1000
-#define CLK_RATE_32KHZ 125
+#define CLK_RATE_32KHZ 128
static int imxulp_watchdog_set_timeout(struct watchdog *wd, unsigned int timeout)
{
--
2.39.2
next reply other threads:[~2024-01-15 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 15:56 Sascha Hauer [this message]
2024-01-15 15:56 ` [PATCH 2/2] watchdog: imxulp: Fix prescaler setting on i.MX7ulp Sascha Hauer
2024-01-16 6:53 ` [PATCH 1/2] watchdog: imxulp: Fix timeout calculation Sascha Hauer
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=20240115155615.953954-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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