]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
watchdog: sbsa: Set WDOG_HW_RUNNING, when watchdog is already running.
authorPratyush Anand <panand@redhat.com>
Tue, 31 May 2016 06:08:10 +0000 (14:08 +0800)
committerWim Van Sebroeck <wim@iguana.be>
Sun, 17 Jul 2016 18:59:47 +0000 (20:59 +0200)
This patch uses the new flag WDOG_HW_RUNNING in driver.
According to the definition of this flag, it should be set,
if watchdog is running after booting, before it's opened.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Fu Wei <fu.wei@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/sbsa_gwdt.c

index 6af71e07f30922ab39f4abbca5d2126f75228b89..cc885f1c18503aee985310c2cb3f563912946df3 100644 (file)
@@ -283,6 +283,8 @@ static int sbsa_gwdt_probe(struct platform_device *pdev)
                dev_warn(dev, "System reset by WDT.\n");
                wdd->bootstatus |= WDIOF_CARDRESET;
        }
+       if (status & SBSA_GWDT_WCS_EN)
+               set_bit(WDOG_HW_RUNNING, &wdd->status);
 
        if (action) {
                irq = platform_get_irq(pdev, 0);