diff options
author | Alexandre Belloni <[email protected]> | 2019-04-11 21:14:37 +0200 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2019-05-05 21:04:56 +0200 |
commit | 9d7c09231e81a3a21a3dee29b97ca034c94a96b6 (patch) | |
tree | 8942b1c9520981cde4ce50b46f8e965eb9f43cbf | |
parent | 0843bdc14ca4c6c8c2906a194fc19c8f7de7361c (diff) |
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: Alexandre Belloni <[email protected]>
Tested-by: Gregory CLEMENT <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index f94d844e596c..d9e03544aeae 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -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) { |