Lines Matching refs:wdt
54 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_keepalive() local
56 wdt->timer_set_ms(wdt, wdd->timeout * 1000); in bcm47xx_wdt_hard_keepalive()
68 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_stop() local
70 wdt->timer_set(wdt, 0); in bcm47xx_wdt_hard_stop()
78 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_set_timeout() local
79 u32 max_timer = wdt->max_timer_ms; in bcm47xx_wdt_hard_set_timeout()
101 struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data; in bcm47xx_wdt_soft_timer_tick() local
102 u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); in bcm47xx_wdt_soft_timer_tick()
104 if (!atomic_dec_and_test(&wdt->soft_ticks)) { in bcm47xx_wdt_soft_timer_tick()
105 wdt->timer_set_ms(wdt, next_tick); in bcm47xx_wdt_soft_timer_tick()
106 mod_timer(&wdt->soft_timer, jiffies + HZ); in bcm47xx_wdt_soft_timer_tick()
114 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_keepalive() local
116 atomic_set(&wdt->soft_ticks, wdd->timeout); in bcm47xx_wdt_soft_keepalive()
123 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_start() local
126 bcm47xx_wdt_soft_timer_tick((unsigned long)wdt); in bcm47xx_wdt_soft_start()
133 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_stop() local
135 del_timer_sync(&wdt->soft_timer); in bcm47xx_wdt_soft_stop()
136 wdt->timer_set(wdt, 0); in bcm47xx_wdt_soft_stop()
164 struct bcm47xx_wdt *wdt; in bcm47xx_wdt_notify_sys() local
166 wdt = container_of(this, struct bcm47xx_wdt, notifier); in bcm47xx_wdt_notify_sys()
168 wdt->wdd.ops->stop(&wdt->wdd); in bcm47xx_wdt_notify_sys()
175 struct bcm47xx_wdt *wdt; in bcm47xx_wdt_restart() local
177 wdt = container_of(this, struct bcm47xx_wdt, restart_handler); in bcm47xx_wdt_restart()
178 wdt->timer_set(wdt, 1); in bcm47xx_wdt_restart()
195 struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev); in bcm47xx_wdt_probe() local
197 if (!wdt) in bcm47xx_wdt_probe()
200 soft = wdt->max_timer_ms < WDT_SOFTTIMER_THRESHOLD * 1000; in bcm47xx_wdt_probe()
203 wdt->wdd.ops = &bcm47xx_wdt_soft_ops; in bcm47xx_wdt_probe()
204 setup_timer(&wdt->soft_timer, bcm47xx_wdt_soft_timer_tick, in bcm47xx_wdt_probe()
205 (long unsigned int)wdt); in bcm47xx_wdt_probe()
207 wdt->wdd.ops = &bcm47xx_wdt_hard_ops; in bcm47xx_wdt_probe()
210 wdt->wdd.info = &bcm47xx_wdt_info; in bcm47xx_wdt_probe()
211 wdt->wdd.timeout = WDT_DEFAULT_TIME; in bcm47xx_wdt_probe()
212 ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); in bcm47xx_wdt_probe()
215 watchdog_set_nowayout(&wdt->wdd, nowayout); in bcm47xx_wdt_probe()
217 wdt->notifier.notifier_call = &bcm47xx_wdt_notify_sys; in bcm47xx_wdt_probe()
219 ret = register_reboot_notifier(&wdt->notifier); in bcm47xx_wdt_probe()
223 wdt->restart_handler.notifier_call = &bcm47xx_wdt_restart; in bcm47xx_wdt_probe()
224 wdt->restart_handler.priority = 64; in bcm47xx_wdt_probe()
225 ret = register_restart_handler(&wdt->restart_handler); in bcm47xx_wdt_probe()
229 ret = watchdog_register_device(&wdt->wdd); in bcm47xx_wdt_probe()
239 unregister_restart_handler(&wdt->restart_handler); in bcm47xx_wdt_probe()
241 unregister_reboot_notifier(&wdt->notifier); in bcm47xx_wdt_probe()
244 del_timer_sync(&wdt->soft_timer); in bcm47xx_wdt_probe()
251 struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev); in bcm47xx_wdt_remove() local
253 if (!wdt) in bcm47xx_wdt_remove()
256 watchdog_unregister_device(&wdt->wdd); in bcm47xx_wdt_remove()
257 unregister_reboot_notifier(&wdt->notifier); in bcm47xx_wdt_remove()