mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] watchdog: imxulp: Fix timeout calculation
@ 2024-01-15 15:56 Sascha Hauer
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2024-01-15 15:56 UTC (permalink / raw)
  To: Barebox List

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-16  6:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15 15:56 [PATCH 1/2] watchdog: imxulp: Fix timeout calculation Sascha Hauer
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox