Lines Matching refs:wdd
47 static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd) in bcm47xx_wdt_get() argument
49 return container_of(wdd, struct bcm47xx_wdt, wdd); in bcm47xx_wdt_get()
52 static int bcm47xx_wdt_hard_keepalive(struct watchdog_device *wdd) in bcm47xx_wdt_hard_keepalive() argument
54 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_keepalive()
56 wdt->timer_set_ms(wdt, wdd->timeout * 1000); in bcm47xx_wdt_hard_keepalive()
61 static int bcm47xx_wdt_hard_start(struct watchdog_device *wdd) in bcm47xx_wdt_hard_start() argument
66 static int bcm47xx_wdt_hard_stop(struct watchdog_device *wdd) in bcm47xx_wdt_hard_stop() argument
68 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_stop()
75 static int bcm47xx_wdt_hard_set_timeout(struct watchdog_device *wdd, in bcm47xx_wdt_hard_set_timeout() argument
78 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_hard_set_timeout()
87 wdd->timeout = new_time; in bcm47xx_wdt_hard_set_timeout()
102 u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); in bcm47xx_wdt_soft_timer_tick()
112 static int bcm47xx_wdt_soft_keepalive(struct watchdog_device *wdd) in bcm47xx_wdt_soft_keepalive() argument
114 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_keepalive()
116 atomic_set(&wdt->soft_ticks, wdd->timeout); in bcm47xx_wdt_soft_keepalive()
121 static int bcm47xx_wdt_soft_start(struct watchdog_device *wdd) in bcm47xx_wdt_soft_start() argument
123 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_start()
125 bcm47xx_wdt_soft_keepalive(wdd); in bcm47xx_wdt_soft_start()
131 static int bcm47xx_wdt_soft_stop(struct watchdog_device *wdd) in bcm47xx_wdt_soft_stop() argument
133 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); in bcm47xx_wdt_soft_stop()
141 static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd, in bcm47xx_wdt_soft_set_timeout() argument
150 wdd->timeout = new_time; in bcm47xx_wdt_soft_set_timeout()
168 wdt->wdd.ops->stop(&wdt->wdd); in bcm47xx_wdt_notify_sys()
192 wdt->wdd.ops = &bcm47xx_wdt_soft_ops; in bcm47xx_wdt_probe()
196 wdt->wdd.ops = &bcm47xx_wdt_hard_ops; in bcm47xx_wdt_probe()
199 wdt->wdd.info = &bcm47xx_wdt_info; in bcm47xx_wdt_probe()
200 wdt->wdd.timeout = WDT_DEFAULT_TIME; in bcm47xx_wdt_probe()
201 ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); in bcm47xx_wdt_probe()
204 watchdog_set_nowayout(&wdt->wdd, nowayout); in bcm47xx_wdt_probe()
212 ret = watchdog_register_device(&wdt->wdd); in bcm47xx_wdt_probe()
237 watchdog_unregister_device(&wdt->wdd); in bcm47xx_wdt_remove()