• Home
  • Raw
  • Download

Lines Matching full:wdt

89 	struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd);  in nic7018_set_timeout()  local
96 wdt->io_base + WDT_PRESET_PRESCALE); in nic7018_set_timeout()
99 wdt->period = config->period; in nic7018_set_timeout()
106 struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); in nic7018_start() local
111 control = inb(wdt->io_base + WDT_RELOAD_CTRL); in nic7018_start()
112 outb(control | WDT_RELOAD_PORT_EN, wdt->io_base + WDT_RELOAD_CTRL); in nic7018_start()
114 outb(1, wdt->io_base + WDT_RELOAD_PORT); in nic7018_start()
116 control = inb(wdt->io_base + WDT_CTRL); in nic7018_start()
117 outb(control | WDT_CTRL_RESET_EN, wdt->io_base + WDT_CTRL); in nic7018_start()
124 struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); in nic7018_stop() local
126 outb(0, wdt->io_base + WDT_CTRL); in nic7018_stop()
127 outb(0, wdt->io_base + WDT_RELOAD_CTRL); in nic7018_stop()
128 outb(0xF0, wdt->io_base + WDT_PRESET_PRESCALE); in nic7018_stop()
135 struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); in nic7018_ping() local
137 outb(1, wdt->io_base + WDT_RELOAD_PORT); in nic7018_ping()
144 struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); in nic7018_get_timeleft() local
147 count = inb(wdt->io_base + WDT_COUNT) & 0xF; in nic7018_get_timeleft()
151 return nic7018_timeout(wdt->period, count); in nic7018_get_timeleft()
172 struct nic7018_wdt *wdt; in nic7018_probe() local
176 wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); in nic7018_probe()
177 if (!wdt) in nic7018_probe()
180 platform_set_drvdata(pdev, wdt); in nic7018_probe()
194 wdt->io_base = io_rc->start; in nic7018_probe()
195 wdd = &wdt->wdd; in nic7018_probe()
203 watchdog_set_drvdata(wdd, wdt); in nic7018_probe()
207 /* Unlock WDT register */ in nic7018_probe()
208 outb(UNLOCK, wdt->io_base + WDT_REG_LOCK); in nic7018_probe()
212 outb(LOCK, wdt->io_base + WDT_REG_LOCK); in nic7018_probe()
217 wdt->io_base, timeout, nowayout); in nic7018_probe()
223 struct nic7018_wdt *wdt = platform_get_drvdata(pdev); in nic7018_remove() local
225 watchdog_unregister_device(&wdt->wdd); in nic7018_remove()
227 /* Lock WDT register */ in nic7018_remove()
228 outb(LOCK, wdt->io_base + WDT_REG_LOCK); in nic7018_remove()