Lines Matching refs:rdc321x_wdt_device

52 } rdc321x_wdt_device;  variable
61 if (rdc321x_wdt_device.running) in rdc321x_wdt_trigger()
65 spin_lock_irqsave(&rdc321x_wdt_device.lock, flags); in rdc321x_wdt_trigger()
66 pci_read_config_dword(rdc321x_wdt_device.sb_pdev, in rdc321x_wdt_trigger()
67 rdc321x_wdt_device.base_reg, &val); in rdc321x_wdt_trigger()
69 pci_write_config_dword(rdc321x_wdt_device.sb_pdev, in rdc321x_wdt_trigger()
70 rdc321x_wdt_device.base_reg, val); in rdc321x_wdt_trigger()
71 spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags); in rdc321x_wdt_trigger()
74 if (rdc321x_wdt_device.queue && ticks) in rdc321x_wdt_trigger()
75 mod_timer(&rdc321x_wdt_device.timer, in rdc321x_wdt_trigger()
79 complete(&rdc321x_wdt_device.stop); in rdc321x_wdt_trigger()
86 ticks = rdc321x_wdt_device.default_ticks; in rdc321x_wdt_reset()
93 if (!rdc321x_wdt_device.queue) { in rdc321x_wdt_start()
94 rdc321x_wdt_device.queue = 1; in rdc321x_wdt_start()
97 spin_lock_irqsave(&rdc321x_wdt_device.lock, flags); in rdc321x_wdt_start()
98 pci_write_config_dword(rdc321x_wdt_device.sb_pdev, in rdc321x_wdt_start()
99 rdc321x_wdt_device.base_reg, RDC_CLS_TMR); in rdc321x_wdt_start()
102 pci_write_config_dword(rdc321x_wdt_device.sb_pdev, in rdc321x_wdt_start()
103 rdc321x_wdt_device.base_reg, in rdc321x_wdt_start()
105 spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags); in rdc321x_wdt_start()
107 mod_timer(&rdc321x_wdt_device.timer, in rdc321x_wdt_start()
112 rdc321x_wdt_device.running++; in rdc321x_wdt_start()
117 if (rdc321x_wdt_device.running) in rdc321x_wdt_stop()
118 rdc321x_wdt_device.running = 0; in rdc321x_wdt_stop()
120 ticks = rdc321x_wdt_device.default_ticks; in rdc321x_wdt_stop()
128 if (test_and_set_bit(0, &rdc321x_wdt_device.inuse)) in rdc321x_wdt_open()
136 clear_bit(0, &rdc321x_wdt_device.inuse); in rdc321x_wdt_release()
157 spin_lock_irqsave(&rdc321x_wdt_device.lock, flags); in rdc321x_wdt_ioctl()
158 pci_read_config_dword(rdc321x_wdt_device.sb_pdev, in rdc321x_wdt_ioctl()
159 rdc321x_wdt_device.base_reg, &value); in rdc321x_wdt_ioctl()
160 spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags); in rdc321x_wdt_ioctl()
232 rdc321x_wdt_device.sb_pdev = pdata->sb_pdev; in rdc321x_wdt_probe()
233 rdc321x_wdt_device.base_reg = r->start; in rdc321x_wdt_probe()
234 rdc321x_wdt_device.queue = 0; in rdc321x_wdt_probe()
235 rdc321x_wdt_device.default_ticks = ticks; in rdc321x_wdt_probe()
243 spin_lock_init(&rdc321x_wdt_device.lock); in rdc321x_wdt_probe()
246 pci_write_config_dword(rdc321x_wdt_device.sb_pdev, in rdc321x_wdt_probe()
247 rdc321x_wdt_device.base_reg, RDC_WDT_RST); in rdc321x_wdt_probe()
249 init_completion(&rdc321x_wdt_device.stop); in rdc321x_wdt_probe()
251 clear_bit(0, &rdc321x_wdt_device.inuse); in rdc321x_wdt_probe()
253 timer_setup(&rdc321x_wdt_device.timer, rdc321x_wdt_trigger, 0); in rdc321x_wdt_probe()
262 if (rdc321x_wdt_device.queue) { in rdc321x_wdt_remove()
263 rdc321x_wdt_device.queue = 0; in rdc321x_wdt_remove()
264 wait_for_completion(&rdc321x_wdt_device.stop); in rdc321x_wdt_remove()