Lines Matching refs:sunxi_wdt

85 	struct sunxi_wdt_dev *sunxi_wdt = watchdog_get_drvdata(wdt_dev);  in sunxi_wdt_restart()  local
86 void __iomem *wdt_base = sunxi_wdt->wdt_base; in sunxi_wdt_restart()
87 const struct sunxi_wdt_reg *regs = sunxi_wdt->wdt_regs; in sunxi_wdt_restart()
119 struct sunxi_wdt_dev *sunxi_wdt = watchdog_get_drvdata(wdt_dev); in sunxi_wdt_ping() local
120 void __iomem *wdt_base = sunxi_wdt->wdt_base; in sunxi_wdt_ping()
121 const struct sunxi_wdt_reg *regs = sunxi_wdt->wdt_regs; in sunxi_wdt_ping()
131 struct sunxi_wdt_dev *sunxi_wdt = watchdog_get_drvdata(wdt_dev); in sunxi_wdt_set_timeout() local
132 void __iomem *wdt_base = sunxi_wdt->wdt_base; in sunxi_wdt_set_timeout()
133 const struct sunxi_wdt_reg *regs = sunxi_wdt->wdt_regs; in sunxi_wdt_set_timeout()
139 sunxi_wdt->wdt_dev.timeout = timeout; in sunxi_wdt_set_timeout()
153 struct sunxi_wdt_dev *sunxi_wdt = watchdog_get_drvdata(wdt_dev); in sunxi_wdt_stop() local
154 void __iomem *wdt_base = sunxi_wdt->wdt_base; in sunxi_wdt_stop()
155 const struct sunxi_wdt_reg *regs = sunxi_wdt->wdt_regs; in sunxi_wdt_stop()
165 struct sunxi_wdt_dev *sunxi_wdt = watchdog_get_drvdata(wdt_dev); in sunxi_wdt_start() local
166 void __iomem *wdt_base = sunxi_wdt->wdt_base; in sunxi_wdt_start()
167 const struct sunxi_wdt_reg *regs = sunxi_wdt->wdt_regs; in sunxi_wdt_start()
170 ret = sunxi_wdt_set_timeout(&sunxi_wdt->wdt_dev, in sunxi_wdt_start()
171 sunxi_wdt->wdt_dev.timeout); in sunxi_wdt_start()
233 struct sunxi_wdt_dev *sunxi_wdt; in sunxi_wdt_probe() local
236 sunxi_wdt = devm_kzalloc(dev, sizeof(*sunxi_wdt), GFP_KERNEL); in sunxi_wdt_probe()
237 if (!sunxi_wdt) in sunxi_wdt_probe()
240 sunxi_wdt->wdt_regs = of_device_get_match_data(dev); in sunxi_wdt_probe()
241 if (!sunxi_wdt->wdt_regs) in sunxi_wdt_probe()
244 sunxi_wdt->wdt_base = devm_platform_ioremap_resource(pdev, 0); in sunxi_wdt_probe()
245 if (IS_ERR(sunxi_wdt->wdt_base)) in sunxi_wdt_probe()
246 return PTR_ERR(sunxi_wdt->wdt_base); in sunxi_wdt_probe()
248 sunxi_wdt->wdt_dev.info = &sunxi_wdt_info; in sunxi_wdt_probe()
249 sunxi_wdt->wdt_dev.ops = &sunxi_wdt_ops; in sunxi_wdt_probe()
250 sunxi_wdt->wdt_dev.timeout = WDT_MAX_TIMEOUT; in sunxi_wdt_probe()
251 sunxi_wdt->wdt_dev.max_timeout = WDT_MAX_TIMEOUT; in sunxi_wdt_probe()
252 sunxi_wdt->wdt_dev.min_timeout = WDT_MIN_TIMEOUT; in sunxi_wdt_probe()
253 sunxi_wdt->wdt_dev.parent = dev; in sunxi_wdt_probe()
255 watchdog_init_timeout(&sunxi_wdt->wdt_dev, timeout, dev); in sunxi_wdt_probe()
256 watchdog_set_nowayout(&sunxi_wdt->wdt_dev, nowayout); in sunxi_wdt_probe()
257 watchdog_set_restart_priority(&sunxi_wdt->wdt_dev, 128); in sunxi_wdt_probe()
259 watchdog_set_drvdata(&sunxi_wdt->wdt_dev, sunxi_wdt); in sunxi_wdt_probe()
261 sunxi_wdt_stop(&sunxi_wdt->wdt_dev); in sunxi_wdt_probe()
263 watchdog_stop_on_reboot(&sunxi_wdt->wdt_dev); in sunxi_wdt_probe()
264 err = devm_watchdog_register_device(dev, &sunxi_wdt->wdt_dev); in sunxi_wdt_probe()
269 sunxi_wdt->wdt_dev.timeout, nowayout); in sunxi_wdt_probe()