Lines Matching refs:wdd

88 	struct watchdog_device	wdd;  member
147 static int sbsa_gwdt_set_timeout(struct watchdog_device *wdd, in sbsa_gwdt_set_timeout() argument
150 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); in sbsa_gwdt_set_timeout()
152 wdd->timeout = timeout; in sbsa_gwdt_set_timeout()
167 static unsigned int sbsa_gwdt_get_timeleft(struct watchdog_device *wdd) in sbsa_gwdt_get_timeleft() argument
169 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); in sbsa_gwdt_get_timeleft()
189 static int sbsa_gwdt_keepalive(struct watchdog_device *wdd) in sbsa_gwdt_keepalive() argument
191 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); in sbsa_gwdt_keepalive()
202 static void sbsa_gwdt_get_version(struct watchdog_device *wdd) in sbsa_gwdt_get_version() argument
204 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); in sbsa_gwdt_get_version()
213 static int sbsa_gwdt_start(struct watchdog_device *wdd) in sbsa_gwdt_start() argument
215 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); in sbsa_gwdt_start()
223 static int sbsa_gwdt_stop(struct watchdog_device *wdd) in sbsa_gwdt_stop() argument
225 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); in sbsa_gwdt_stop()
261 struct watchdog_device *wdd; in sbsa_gwdt_probe() local
288 wdd = &gwdt->wdd; in sbsa_gwdt_probe()
289 wdd->parent = dev; in sbsa_gwdt_probe()
290 wdd->info = &sbsa_gwdt_info; in sbsa_gwdt_probe()
291 wdd->ops = &sbsa_gwdt_ops; in sbsa_gwdt_probe()
292 wdd->min_timeout = 1; in sbsa_gwdt_probe()
293 wdd->timeout = DEFAULT_TIMEOUT; in sbsa_gwdt_probe()
294 watchdog_set_drvdata(wdd, gwdt); in sbsa_gwdt_probe()
295 watchdog_set_nowayout(wdd, nowayout); in sbsa_gwdt_probe()
296 sbsa_gwdt_get_version(wdd); in sbsa_gwdt_probe()
298 wdd->max_hw_heartbeat_ms = U32_MAX / gwdt->clk * 1000; in sbsa_gwdt_probe()
300 wdd->max_hw_heartbeat_ms = GENMASK_ULL(47, 0) / gwdt->clk * 1000; in sbsa_gwdt_probe()
305 wdd->bootstatus |= WDIOF_CARDRESET; in sbsa_gwdt_probe()
308 set_bit(WDOG_HW_RUNNING, &wdd->status); in sbsa_gwdt_probe()
336 wdd->max_hw_heartbeat_ms *= 2; in sbsa_gwdt_probe()
338 watchdog_init_timeout(wdd, timeout, dev); in sbsa_gwdt_probe()
344 sbsa_gwdt_set_timeout(wdd, wdd->timeout); in sbsa_gwdt_probe()
346 watchdog_stop_on_reboot(wdd); in sbsa_gwdt_probe()
347 ret = devm_watchdog_register_device(dev, wdd); in sbsa_gwdt_probe()
352 wdd->timeout, gwdt->clk, action, in sbsa_gwdt_probe()
363 if (watchdog_active(&gwdt->wdd)) in sbsa_gwdt_suspend()
364 sbsa_gwdt_stop(&gwdt->wdd); in sbsa_gwdt_suspend()
374 if (watchdog_active(&gwdt->wdd)) in sbsa_gwdt_resume()
375 sbsa_gwdt_start(&gwdt->wdd); in sbsa_gwdt_resume()