Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: imx7ulp_wdt: keep already running watchdog enabled

When the bootloader enabled the watchdog before Kernel started then
keep it enabled during initialization. Otherwise the time between
the watchdog probing and the userspace taking over the watchdog
won't be covered by the watchdog. When keeping the watchdog enabled
inform the Kernel about this by setting the WDOG_HW_RUNNING so that
the periodic watchdog feeder is started when desired.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240703111603.1096424-1-s.hauer@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Sascha Hauer and committed by
Wim Van Sebroeck
b771d14f 9dca7a0a

+5
+5
drivers/watchdog/imx7ulp_wdt.c
··· 290 290 if (wdt->ext_reset) 291 291 val |= WDOG_CS_INT_EN; 292 292 293 + if (readl(wdt->base + WDOG_CS) & WDOG_CS_EN) { 294 + set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); 295 + val |= WDOG_CS_EN; 296 + } 297 + 293 298 do { 294 299 ret = _imx7ulp_wdt_init(wdt, timeout, val); 295 300 toval = readl(wdt->base + WDOG_TOVAL);