• Home
  • Raw
  • Download

Lines Matching refs:wdd

54 	struct watchdog_device wdd;  member
60 static struct rave_sp_wdt *to_rave_sp_wdt(struct watchdog_device *wdd) in to_rave_sp_wdt() argument
62 return container_of(wdd, struct rave_sp_wdt, wdd); in to_rave_sp_wdt()
65 static int rave_sp_wdt_exec(struct watchdog_device *wdd, void *data, in rave_sp_wdt_exec() argument
68 return rave_sp_exec(to_rave_sp_wdt(wdd)->sp, in rave_sp_wdt_exec()
72 static int rave_sp_wdt_legacy_configure(struct watchdog_device *wdd, bool on) in rave_sp_wdt_legacy_configure() argument
79 [4] = on ? wdd->timeout : 0, in rave_sp_wdt_legacy_configure()
82 return rave_sp_wdt_exec(wdd, cmd, sizeof(cmd)); in rave_sp_wdt_legacy_configure()
85 static int rave_sp_wdt_rdu_configure(struct watchdog_device *wdd, bool on) in rave_sp_wdt_rdu_configure() argument
91 [3] = (u8)wdd->timeout, in rave_sp_wdt_rdu_configure()
92 [4] = (u8)(wdd->timeout >> 8), in rave_sp_wdt_rdu_configure()
95 return rave_sp_wdt_exec(wdd, cmd, sizeof(cmd)); in rave_sp_wdt_rdu_configure()
112 static int rave_sp_wdt_configure(struct watchdog_device *wdd, bool on) in rave_sp_wdt_configure() argument
114 return to_rave_sp_wdt(wdd)->variant->configure(wdd, on); in rave_sp_wdt_configure()
117 static int rave_sp_wdt_legacy_restart(struct watchdog_device *wdd) in rave_sp_wdt_legacy_restart() argument
125 return rave_sp_wdt_exec(wdd, cmd, sizeof(cmd)); in rave_sp_wdt_legacy_restart()
128 static int rave_sp_wdt_rdu_restart(struct watchdog_device *wdd) in rave_sp_wdt_rdu_restart() argument
137 return rave_sp_wdt_exec(wdd, cmd, sizeof(cmd)); in rave_sp_wdt_rdu_restart()
154 const int ret = sp_wd->variant->restart(&sp_wd->wdd); in rave_sp_wdt_reboot_notifier()
157 dev_err(sp_wd->wdd.parent, in rave_sp_wdt_reboot_notifier()
165 static int rave_sp_wdt_restart(struct watchdog_device *wdd, in rave_sp_wdt_restart() argument
179 static int rave_sp_wdt_start(struct watchdog_device *wdd) in rave_sp_wdt_start() argument
183 ret = rave_sp_wdt_configure(wdd, true); in rave_sp_wdt_start()
185 set_bit(WDOG_HW_RUNNING, &wdd->status); in rave_sp_wdt_start()
190 static int rave_sp_wdt_stop(struct watchdog_device *wdd) in rave_sp_wdt_stop() argument
192 return rave_sp_wdt_configure(wdd, false); in rave_sp_wdt_stop()
195 static int rave_sp_wdt_set_timeout(struct watchdog_device *wdd, in rave_sp_wdt_set_timeout() argument
198 wdd->timeout = timeout; in rave_sp_wdt_set_timeout()
200 return rave_sp_wdt_configure(wdd, watchdog_active(wdd)); in rave_sp_wdt_set_timeout()
203 static int rave_sp_wdt_ping(struct watchdog_device *wdd) in rave_sp_wdt_ping() argument
210 return rave_sp_wdt_exec(wdd, cmd, sizeof(cmd)); in rave_sp_wdt_ping()
256 struct watchdog_device *wdd; in rave_sp_wdt_probe() local
269 wdd = &sp_wd->wdd; in rave_sp_wdt_probe()
270 wdd->parent = dev; in rave_sp_wdt_probe()
271 wdd->info = &rave_sp_wdt_info; in rave_sp_wdt_probe()
272 wdd->ops = &rave_sp_wdt_ops; in rave_sp_wdt_probe()
273 wdd->min_timeout = sp_wd->variant->min_timeout; in rave_sp_wdt_probe()
274 wdd->max_timeout = sp_wd->variant->max_timeout; in rave_sp_wdt_probe()
275 wdd->status = WATCHDOG_NOWAYOUT_INIT_STATUS; in rave_sp_wdt_probe()
276 wdd->timeout = 60; in rave_sp_wdt_probe()
289 watchdog_init_timeout(wdd, le16_to_cpu(timeout), dev); in rave_sp_wdt_probe()
290 watchdog_set_restart_priority(wdd, 255); in rave_sp_wdt_probe()
291 watchdog_stop_on_unregister(wdd); in rave_sp_wdt_probe()
304 wdd->max_hw_heartbeat_ms = wdd->max_timeout * 1000; in rave_sp_wdt_probe()
305 ret = rave_sp_wdt_start(wdd); in rave_sp_wdt_probe()
311 ret = devm_watchdog_register_device(dev, wdd); in rave_sp_wdt_probe()
313 rave_sp_wdt_stop(wdd); in rave_sp_wdt_probe()