Lines Matching refs:wdd

43 static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd)  in bcm47xx_wdt_get()  argument
45 return container_of(wdd, struct bcm47xx_wdt, wdd); in bcm47xx_wdt_get()
48 static int bcm47xx_wdt_hard_keepalive(struct watchdog_device *wdd) in bcm47xx_wdt_hard_keepalive() argument
50 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_keepalive()
52 wdt->timer_set_ms(wdt, wdd->timeout * 1000); in bcm47xx_wdt_hard_keepalive()
57 static int bcm47xx_wdt_hard_start(struct watchdog_device *wdd) in bcm47xx_wdt_hard_start() argument
62 static int bcm47xx_wdt_hard_stop(struct watchdog_device *wdd) in bcm47xx_wdt_hard_stop() argument
64 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_stop()
71 static int bcm47xx_wdt_hard_set_timeout(struct watchdog_device *wdd, in bcm47xx_wdt_hard_set_timeout() argument
74 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_set_timeout()
83 wdd->timeout = new_time; in bcm47xx_wdt_hard_set_timeout()
87 static int bcm47xx_wdt_restart(struct watchdog_device *wdd, in bcm47xx_wdt_restart() argument
90 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_restart()
109 u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); in bcm47xx_wdt_soft_timer_tick()
119 static int bcm47xx_wdt_soft_keepalive(struct watchdog_device *wdd) in bcm47xx_wdt_soft_keepalive() argument
121 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_keepalive()
123 atomic_set(&wdt->soft_ticks, wdd->timeout); in bcm47xx_wdt_soft_keepalive()
128 static int bcm47xx_wdt_soft_start(struct watchdog_device *wdd) in bcm47xx_wdt_soft_start() argument
130 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_start()
132 bcm47xx_wdt_soft_keepalive(wdd); in bcm47xx_wdt_soft_start()
138 static int bcm47xx_wdt_soft_stop(struct watchdog_device *wdd) in bcm47xx_wdt_soft_stop() argument
140 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_stop()
148 static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd, in bcm47xx_wdt_soft_set_timeout() argument
157 wdd->timeout = new_time; in bcm47xx_wdt_soft_set_timeout()
189 wdt->wdd.ops = &bcm47xx_wdt_soft_ops; in bcm47xx_wdt_probe()
192 wdt->wdd.ops = &bcm47xx_wdt_hard_ops; in bcm47xx_wdt_probe()
195 wdt->wdd.info = &bcm47xx_wdt_info; in bcm47xx_wdt_probe()
196 wdt->wdd.timeout = WDT_DEFAULT_TIME; in bcm47xx_wdt_probe()
197 wdt->wdd.parent = &pdev->dev; in bcm47xx_wdt_probe()
198 ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); in bcm47xx_wdt_probe()
201 watchdog_set_nowayout(&wdt->wdd, nowayout); in bcm47xx_wdt_probe()
202 watchdog_set_restart_priority(&wdt->wdd, 64); in bcm47xx_wdt_probe()
203 watchdog_stop_on_reboot(&wdt->wdd); in bcm47xx_wdt_probe()
205 ret = watchdog_register_device(&wdt->wdd); in bcm47xx_wdt_probe()
225 watchdog_unregister_device(&wdt->wdd); in bcm47xx_wdt_remove()