Commit 9d7c0923 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Wim Van Sebroeck
Browse files

watchdog: pnx4008: readout watchdog state



Readout the enabled state so it is possible to get the pre-userspace
handler working. Also, avoid disabling the watchdog to ensure it continues
working and triggers if there is an issue later in the boot or if userspace
fails to start.

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Tested-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 0843bdc1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -217,7 +217,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
	watchdog_set_nowayout(&pnx4008_wdd, nowayout);
	watchdog_set_restart_priority(&pnx4008_wdd, 128);

	pnx4008_wdt_stop(&pnx4008_wdd);	/* disable for now */
	if (readl(WDTIM_CTRL(wdt_base)) & COUNT_ENAB)
		set_bit(WDOG_HW_RUNNING, &pnx4008_wdd.status);

	ret = devm_watchdog_register_device(dev, &pnx4008_wdd);
	if (ret < 0) {