|
@@ -244,7 +244,14 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
|
|
|
watchdog_set_nowayout(&wdt->wdd, nowayout);
|
|
watchdog_set_nowayout(&wdt->wdd, nowayout);
|
|
|
watchdog_set_drvdata(&wdt->wdd, wdt);
|
|
watchdog_set_drvdata(&wdt->wdd, wdt);
|
|
|
watchdog_set_restart_priority(&wdt->wdd, 128);
|
|
watchdog_set_restart_priority(&wdt->wdd, 128);
|
|
|
- wdt_setload(&wdt->wdd, DEFAULT_TIMEOUT);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /*
|
|
|
|
|
+ * If 'timeout-sec' devicetree property is specified, use that.
|
|
|
|
|
+ * Otherwise, use DEFAULT_TIMEOUT
|
|
|
|
|
+ */
|
|
|
|
|
+ wdt->wdd.timeout = DEFAULT_TIMEOUT;
|
|
|
|
|
+ watchdog_init_timeout(&wdt->wdd, 0, &adev->dev);
|
|
|
|
|
+ wdt_setload(&wdt->wdd, wdt->wdd.timeout);
|
|
|
|
|
|
|
|
ret = watchdog_register_device(&wdt->wdd);
|
|
ret = watchdog_register_device(&wdt->wdd);
|
|
|
if (ret) {
|
|
if (ret) {
|