Lines Matching refs:wdt
6 * Based on EP93xx wdt driver
63 struct watchdog_device wdt;
88 static struct ltq_wdt_priv *ltq_wdt_get_priv(struct watchdog_device *wdt)
90 return container_of(wdt, struct ltq_wdt_priv, wdt);
99 static int ltq_wdt_start(struct watchdog_device *wdt)
101 struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt);
104 timeout = wdt->timeout * priv->clk_rate;
116 static int ltq_wdt_stop(struct watchdog_device *wdt)
118 struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt);
127 static int ltq_wdt_ping(struct watchdog_device *wdt)
129 struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt);
132 timeout = wdt->timeout * priv->clk_rate;
142 static unsigned int ltq_wdt_get_timeleft(struct watchdog_device *wdt)
144 struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt);
204 struct watchdog_device *wdt;
227 wdt = &priv->wdt;
228 wdt->info = <q_wdt_info;
229 wdt->ops = <q_wdt_ops;
230 wdt->min_timeout = 1;
231 wdt->max_timeout = LTQ_WDT_CR_MAX_TIMEOUT / priv->clk_rate;
232 wdt->timeout = wdt->max_timeout;
233 wdt->parent = dev;
239 wdt->bootstatus = ret;
242 watchdog_set_nowayout(wdt, nowayout);
243 watchdog_init_timeout(wdt, 0, dev);
252 ltq_wdt_start(wdt);
253 set_bit(WDOG_HW_RUNNING, &wdt->status);
256 return devm_watchdog_register_device(dev, wdt);
268 { .compatible = "lantiq,wdt", .data = NULL },
269 { .compatible = "lantiq,xrx100-wdt", .data = <q_wdt_xrx100 },
270 { .compatible = "lantiq,falcon-wdt", .data = <q_wdt_falcon },
278 .name = "wdt",