We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf38e76 commit 266da53Copy full SHA for 266da53
drivers/watchdog/sama5d4_wdt.c
@@ -254,6 +254,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
254
struct sama5d4_wdt *wdt;
255
void __iomem *regs;
256
u32 irq = 0;
257
+ u32 reg;
258
int ret;
259
260
wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
@@ -304,6 +305,12 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
304
305
306
watchdog_init_timeout(wdd, wdt_timeout, dev);
307
308
+ reg = wdt_read(wdt, AT91_WDT_MR);
309
+ if (!(reg & AT91_WDT_WDDIS)) {
310
+ wdt->mr &= ~AT91_WDT_WDDIS;
311
+ set_bit(WDOG_HW_RUNNING, &wdd->status);
312
+ }
313
+
314
ret = sama5d4_wdt_init(wdt);
315
if (ret)
316
return ret;
0 commit comments