]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/watchdog/f71808e_wdt.c
watchdog: f71808e_wdt: clear watchdog timeout occurred flag
[mirror_ubuntu-focal-kernel.git] / drivers / watchdog / f71808e_wdt.c
index 42752ea3cdef765bbb3610917e9379e1cc30d65a..893cef70c159911f834eeece64c8350590fa6176 100644 (file)
@@ -689,8 +689,7 @@ static int __init watchdog_init(int sioaddr)
         * into the module have been registered yet.
         */
        watchdog.sioaddr = sioaddr;
-       watchdog.ident.options = WDIOC_SETTIMEOUT
-                               | WDIOF_MAGICCLOSE
+       watchdog.ident.options = WDIOF_MAGICCLOSE
                                | WDIOF_KEEPALIVEPING
                                | WDIOF_CARDRESET;
 
@@ -706,6 +705,13 @@ static int __init watchdog_init(int sioaddr)
        wdt_conf = superio_inb(sioaddr, F71808FG_REG_WDT_CONF);
        watchdog.caused_reboot = wdt_conf & BIT(F71808FG_FLAG_WDTMOUT_STS);
 
+       /*
+        * We don't want WDTMOUT_STS to stick around till regular reboot.
+        * Write 1 to the bit to clear it to zero.
+        */
+       superio_outb(sioaddr, F71808FG_REG_WDT_CONF,
+                    wdt_conf | BIT(F71808FG_FLAG_WDTMOUT_STS));
+
        superio_exit(sioaddr);
 
        err = watchdog_set_timeout(timeout);