Lines Matching refs:wdd
26 struct watchdog_device wdd;
38 static int gxp_wdt_start(struct watchdog_device *wdd)
40 struct gxp_wdt *drvdata = watchdog_get_drvdata(wdd);
42 writew(SECS_TO_WDOG_TICKS(wdd->timeout), drvdata->base + GXP_WDT_CNT_OFS);
47 static int gxp_wdt_stop(struct watchdog_device *wdd)
49 struct gxp_wdt *drvdata = watchdog_get_drvdata(wdd);
58 static int gxp_wdt_set_timeout(struct watchdog_device *wdd,
61 struct gxp_wdt *drvdata = watchdog_get_drvdata(wdd);
64 wdd->timeout = timeout;
65 actual = min(timeout * 100, wdd->max_hw_heartbeat_ms / 10);
71 static unsigned int gxp_wdt_get_timeleft(struct watchdog_device *wdd)
73 struct gxp_wdt *drvdata = watchdog_get_drvdata(wdd);
79 static int gxp_wdt_ping(struct watchdog_device *wdd)
81 struct gxp_wdt *drvdata = watchdog_get_drvdata(wdd);
87 static int gxp_restart(struct watchdog_device *wdd, unsigned long action,
90 struct gxp_wdt *drvdata = watchdog_get_drvdata(wdd);
136 drvdata->wdd.info = &gxp_wdt_info;
137 drvdata->wdd.ops = &gxp_wdt_ops;
138 drvdata->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS;
139 drvdata->wdd.parent = dev;
140 drvdata->wdd.timeout = WDT_DEFAULT_TIMEOUT;
142 watchdog_set_drvdata(&drvdata->wdd, drvdata);
143 watchdog_set_nowayout(&drvdata->wdd, WATCHDOG_NOWAYOUT);
148 set_bit(WDOG_HW_RUNNING, &drvdata->wdd.status);
150 watchdog_set_restart_priority(&drvdata->wdd, 128);
152 watchdog_stop_on_reboot(&drvdata->wdd);
153 err = devm_watchdog_register_device(dev, &drvdata->wdd);