Lines Matching full:drv
36 struct men_z069_drv *drv = watchdog_get_drvdata(wdt); in men_z069_wdt_start() local
39 val = readw(drv->base + MEN_Z069_WTR); in men_z069_wdt_start()
41 writew(val, drv->base + MEN_Z069_WTR); in men_z069_wdt_start()
48 struct men_z069_drv *drv = watchdog_get_drvdata(wdt); in men_z069_wdt_stop() local
51 val = readw(drv->base + MEN_Z069_WTR); in men_z069_wdt_stop()
53 writew(val, drv->base + MEN_Z069_WTR); in men_z069_wdt_stop()
60 struct men_z069_drv *drv = watchdog_get_drvdata(wdt); in men_z069_wdt_ping() local
64 val = readw(drv->base + MEN_Z069_WVR); in men_z069_wdt_ping()
66 writew(val, drv->base + MEN_Z069_WVR); in men_z069_wdt_ping()
74 struct men_z069_drv *drv = watchdog_get_drvdata(wdt); in men_z069_wdt_set_timeout() local
80 reg = readw(drv->base + MEN_Z069_WTR); in men_z069_wdt_set_timeout()
83 writew(reg, drv->base + MEN_Z069_WTR); in men_z069_wdt_set_timeout()
104 struct men_z069_drv *drv; in men_z069_probe() local
107 drv = devm_kzalloc(&dev->dev, sizeof(struct men_z069_drv), GFP_KERNEL); in men_z069_probe()
108 if (!drv) in men_z069_probe()
115 drv->base = devm_ioremap(&dev->dev, mem->start, resource_size(mem)); in men_z069_probe()
116 if (drv->base == NULL) in men_z069_probe()
119 drv->mem = mem; in men_z069_probe()
120 drv->wdt.info = &men_z069_info; in men_z069_probe()
121 drv->wdt.ops = &men_z069_ops; in men_z069_probe()
122 drv->wdt.timeout = MEN_Z069_DEFAULT_TIMEOUT; in men_z069_probe()
123 drv->wdt.min_timeout = 1; in men_z069_probe()
124 drv->wdt.max_timeout = MEN_Z069_WDT_COUNTER_MAX / MEN_Z069_TIMER_FREQ; in men_z069_probe()
126 watchdog_init_timeout(&drv->wdt, 0, &dev->dev); in men_z069_probe()
127 watchdog_set_nowayout(&drv->wdt, nowayout); in men_z069_probe()
128 watchdog_set_drvdata(&drv->wdt, drv); in men_z069_probe()
129 drv->wdt.parent = &dev->dev; in men_z069_probe()
130 mcb_set_drvdata(dev, drv); in men_z069_probe()
132 return watchdog_register_device(&drv->wdt); in men_z069_probe()
141 struct men_z069_drv *drv = mcb_get_drvdata(dev); in men_z069_remove() local
143 watchdog_unregister_device(&drv->wdt); in men_z069_remove()
144 mcb_release_mem(drv->mem); in men_z069_remove()