[PATCH 1/2] watchdog: imxulp: Fix timeout calculation
Sascha Hauer
s.hauer at pengutronix.de
Mon Jan 15 07:56:14 PST 2024
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 at 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
More information about the barebox
mailing list