staging: comedi: addi-data: remove devpriv macro
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / comedi / drivers / addi-data / hwdrv_apci2200.c
CommitLineData
c995fe94
ADG
1/**
2@verbatim
3
4Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
5
356cdbcb
BP
6 ADDI-DATA GmbH
7 Dieselstrasse 3
8 D-77833 Ottersweier
9 Tel: +19(0)7223/9493-0
10 Fax: +49(0)7223/9493-92
25417922 11 http://www.addi-data.com
356cdbcb 12 info@addi-data.com
c995fe94
ADG
13
14This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
39cfb97b 20You should also find the complete GPL in the COPYING file accompanying this source code.
c995fe94
ADG
21
22@endverbatim
23*/
24/*
25
26 +-----------------------------------------------------------------------+
27 | (C) ADDI-DATA GmbH Dieselstraße 3 D-77833 Ottersweier |
28 +-----------------------------------------------------------------------+
29 | Tel : +49 (0) 7223/9493-0 | email : info@addi-data.com |
30 | Fax : +49 (0) 7223/9493-92 | Internet : http://www.addi-data.com |
31 +-------------------------------+---------------------------------------+
32 | Project : APCI-2200 | Compiler : GCC |
33 | Module name : hwdrv_apci2200.c| Version : 2.96 |
34 +-------------------------------+---------------------------------------+
35 | Project manager: Eric Stolz | Date : 02/12/2002 |
36 +-------------------------------+---------------------------------------+
6cd5a9a3 37 | Description : Hardware Layer Access For APCI-2200 |
c995fe94
ADG
38 +-----------------------------------------------------------------------+
39 | UPDATES |
40 +----------+-----------+------------------------------------------------+
41 | Date | Author | Description of updates |
42 +----------+-----------+------------------------------------------------+
43 | | | |
44 | | | |
45 | | | |
46 +----------+-----------+------------------------------------------------+
47*/
48
49/*
50+----------------------------------------------------------------------------+
51| Included files |
52+----------------------------------------------------------------------------+
53*/
54#include "hwdrv_apci2200.h"
55
56/*
57+----------------------------------------------------------------------------+
58| Function Name : int i_APCI2200_Read1DigitalInput |
34c43922 59| (struct comedi_device *dev,struct comedi_subdevice *s, |
90035c08 60| struct comedi_insn *insn,unsigned int *data) |
c995fe94
ADG
61+----------------------------------------------------------------------------+
62| Task : Return the status of the digital input |
63+----------------------------------------------------------------------------+
71b5f4f1 64| Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 65| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 66| struct comedi_insn *insn :pointer to insn structure |
790c5541 67| unsigned int *data : Data Pointer to read status |
c995fe94
ADG
68+----------------------------------------------------------------------------+
69| Output Parameters : -- |
70+----------------------------------------------------------------------------+
71| Return Value : TRUE : No error occur |
72| : FALSE : Error occur. Return the error |
73| |
74+----------------------------------------------------------------------------+
75*/
da91b269
BP
76int i_APCI2200_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
77 struct comedi_insn *insn, unsigned int *data)
c995fe94 78{
843690b7 79 struct addi_private *devpriv = dev->private;
117102b0
BP
80 unsigned int ui_TmpValue = 0;
81 unsigned int ui_Channel;
843690b7 82
c995fe94 83 ui_Channel = CR_CHAN(insn->chanspec);
dc8af068 84 if (ui_Channel <= 7) {
117102b0 85 ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
c995fe94 86 *data = (ui_TmpValue >> ui_Channel) & 0x1;
2696fb57 87 } /* if(ui_Channel >= 0 && ui_Channel <=7) */
c995fe94
ADG
88 else {
89 printk("\nThe specified channel does not exist\n");
2696fb57
BP
90 return -EINVAL; /* "sorry channel spec wrong " */
91 } /* else if(ui_Channel >= 0 && ui_Channel <=7) */
c995fe94
ADG
92
93 return insn->n;
94}
95
96/*
97+----------------------------------------------------------------------------+
98| Function Name : int i_APCI2200_ReadMoreDigitalInput |
34c43922 99| (struct comedi_device *dev,struct comedi_subdevice *s, |
90035c08 100| struct comedi_insn *insn,unsigned int *data) |
c995fe94
ADG
101+----------------------------------------------------------------------------+
102| Task : Return the status of the Requested digital inputs |
103+----------------------------------------------------------------------------+
71b5f4f1 104| Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 105| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 106| struct comedi_insn *insn :pointer to insn structure |
790c5541 107| unsigned int *data : Data Pointer to read status |
c995fe94
ADG
108+----------------------------------------------------------------------------+
109| Output Parameters : -- |
110+----------------------------------------------------------------------------+
111| Return Value : TRUE : No error occur |
112| : FALSE : Error occur. Return the error |
113| |
114+----------------------------------------------------------------------------+
115*/
116
da91b269
BP
117int i_APCI2200_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
118 struct comedi_insn *insn, unsigned int *data)
c995fe94 119{
843690b7 120 struct addi_private *devpriv = dev->private;
117102b0
BP
121 unsigned int ui_PortValue = data[0];
122 unsigned int ui_Mask = 0;
123 unsigned int ui_NoOfChannels;
c995fe94
ADG
124
125 ui_NoOfChannels = CR_CHAN(insn->chanspec);
126
117102b0 127 *data = (unsigned int) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
c995fe94
ADG
128 switch (ui_NoOfChannels) {
129 case 2:
130 ui_Mask = 3;
131 *data = (*data >> (2 * ui_PortValue)) & ui_Mask;
132 break;
133 case 4:
134 ui_Mask = 15;
135 *data = (*data >> (4 * ui_PortValue)) & ui_Mask;
136 break;
137 case 7:
138 break;
139
140 default:
141 printk("\nWrong parameters\n");
2696fb57 142 return -EINVAL; /* "sorry channel spec wrong " */
c995fe94 143 break;
2696fb57 144 } /* switch(ui_NoOfChannels) */
c995fe94
ADG
145
146 return insn->n;
147}
148
149/*
150+----------------------------------------------------------------------------+
71b5f4f1 151| Function Name : int i_APCI2200_ConfigDigitalOutput (struct comedi_device *dev,
356cdbcb 152| struct comedi_subdevice *s struct comedi_insn *insn,unsigned int *data) |
c995fe94
ADG
153| |
154+----------------------------------------------------------------------------+
155| Task : Configures The Digital Output Subdevice. |
156+----------------------------------------------------------------------------+
71b5f4f1 157| Input Parameters : struct comedi_device *dev : Driver handle |
790c5541 158| unsigned int *data : Data Pointer contains |
c995fe94 159| configuration parameters as below |
34c43922 160| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 161| struct comedi_insn *insn :pointer to insn structure |
c995fe94
ADG
162| data[0] :1:Memory on |
163| 0:Memory off |
164| |
165| |
166+----------------------------------------------------------------------------+
167| Output Parameters : -- |
168+----------------------------------------------------------------------------+
169| Return Value : TRUE : No error occur |
170| : FALSE : Error occur. Return the error |
171| |
172+----------------------------------------------------------------------------+
173*/
da91b269
BP
174int i_APCI2200_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
175 struct comedi_insn *insn, unsigned int *data)
c995fe94 176{
843690b7
HS
177 struct addi_private *devpriv = dev->private;
178
c995fe94
ADG
179 devpriv->b_OutputMemoryStatus = data[0];
180 return insn->n;
181}
182
183/*
184+----------------------------------------------------------------------------+
185| Function Name : int i_APCI2200_WriteDigitalOutput |
90035c08 186| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
356cdbcb 187| unsigned int *data) |
c995fe94
ADG
188+----------------------------------------------------------------------------+
189| Task : Writes port value To the selected port |
190+----------------------------------------------------------------------------+
71b5f4f1 191| Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 192| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 193| struct comedi_insn *insn :pointer to insn structure |
790c5541 194| unsigned int *data : Data Pointer to read status |
c995fe94
ADG
195+----------------------------------------------------------------------------+
196| Output Parameters : -- |
197+----------------------------------------------------------------------------+
198| Return Value : TRUE : No error occur |
199| : FALSE : Error occur. Return the error |
200| |
201+----------------------------------------------------------------------------+
202*/
203
da91b269
BP
204int i_APCI2200_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
205 struct comedi_insn *insn, unsigned int *data)
c995fe94 206{
843690b7 207 struct addi_private *devpriv = dev->private;
117102b0 208 unsigned int ui_Temp, ui_Temp1;
2696fb57 209 unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
843690b7 210
c995fe94
ADG
211 if (devpriv->b_OutputMemoryStatus) {
212 ui_Temp = inw(devpriv->iobase + APCI2200_DIGITAL_OP);
213
2696fb57 214 } /* if(devpriv->b_OutputMemoryStatus ) */
c995fe94
ADG
215 else {
216 ui_Temp = 0;
2696fb57 217 } /* if(devpriv->b_OutputMemoryStatus ) */
c995fe94
ADG
218 if (data[3] == 0) {
219 if (data[1] == 0) {
220 data[0] = (data[0] << ui_NoOfChannel) | ui_Temp;
221 outw(data[0], devpriv->iobase + APCI2200_DIGITAL_OP);
2696fb57 222 } /* if(data[1]==0) */
c995fe94
ADG
223 else {
224 if (data[1] == 1) {
225 switch (ui_NoOfChannel) {
226
227 case 2:
228 data[0] =
229 (data[0] << (2 *
230 data[2])) | ui_Temp;
231 break;
232
233 case 4:
234 data[0] =
235 (data[0] << (4 *
236 data[2])) | ui_Temp;
237 break;
238
239 case 8:
240 data[0] =
241 (data[0] << (8 *
242 data[2])) | ui_Temp;
243 break;
244 case 15:
245 data[0] = data[0] | ui_Temp;
246 break;
247 default:
248 comedi_error(dev, " chan spec wrong");
2696fb57 249 return -EINVAL; /* "sorry channel spec wrong " */
c995fe94 250
2696fb57 251 } /* switch(ui_NoOfChannels) */
c995fe94
ADG
252
253 outw(data[0],
254 devpriv->iobase + APCI2200_DIGITAL_OP);
2696fb57 255 } /* if(data[1]==1) */
c995fe94
ADG
256 else {
257 printk("\nSpecified channel not supported\n");
2696fb57
BP
258 } /* else if(data[1]==1) */
259 } /* elseif(data[1]==0) */
260 } /* if(data[3]==0) */
c995fe94
ADG
261 else {
262 if (data[3] == 1) {
263 if (data[1] == 0) {
264 data[0] = ~data[0] & 0x1;
265 ui_Temp1 = 1;
266 ui_Temp1 = ui_Temp1 << ui_NoOfChannel;
267 ui_Temp = ui_Temp | ui_Temp1;
268 data[0] = (data[0] << ui_NoOfChannel) ^ 0xffff;
269 data[0] = data[0] & ui_Temp;
270 outw(data[0],
271 devpriv->iobase + APCI2200_DIGITAL_OP);
2696fb57 272 } /* if(data[1]==0) */
c995fe94
ADG
273 else {
274 if (data[1] == 1) {
275 switch (ui_NoOfChannel) {
276
277 case 2:
278 data[0] = ~data[0] & 0x3;
279 ui_Temp1 = 3;
280 ui_Temp1 =
281 ui_Temp1 << 2 * data[2];
282 ui_Temp = ui_Temp | ui_Temp1;
283 data[0] =
284 ((data[0] << (2 *
285 data
286 [2])) ^
287 0xffff) & ui_Temp;
288 break;
289
290 case 4:
291 data[0] = ~data[0] & 0xf;
292 ui_Temp1 = 15;
293 ui_Temp1 =
294 ui_Temp1 << 4 * data[2];
295 ui_Temp = ui_Temp | ui_Temp1;
296 data[0] =
297 ((data[0] << (4 *
298 data
299 [2])) ^
300 0xffff) & ui_Temp;
301 break;
302
303 case 8:
304 data[0] = ~data[0] & 0xff;
305 ui_Temp1 = 255;
306 ui_Temp1 =
307 ui_Temp1 << 8 * data[2];
308 ui_Temp = ui_Temp | ui_Temp1;
309 data[0] =
310 ((data[0] << (8 *
311 data
312 [2])) ^
313 0xffff) & ui_Temp;
314 break;
315 case 15:
316 break;
317
318 default:
319 comedi_error(dev,
320 " chan spec wrong");
2696fb57 321 return -EINVAL; /* "sorry channel spec wrong " */
c995fe94 322
2696fb57 323 } /* switch(ui_NoOfChannels) */
c995fe94
ADG
324
325 outw(data[0],
326 devpriv->iobase +
327 APCI2200_DIGITAL_OP);
2696fb57 328 } /* if(data[1]==1) */
c995fe94
ADG
329 else {
330 printk("\nSpecified channel not supported\n");
2696fb57
BP
331 } /* else if(data[1]==1) */
332 } /* elseif(data[1]==0) */
333 } /* if(data[3]==1); */
c995fe94
ADG
334 else {
335 printk("\nSpecified functionality does not exist\n");
336 return -EINVAL;
2696fb57
BP
337 } /* if else data[3]==1) */
338 } /* if else data[3]==0) */
dae0dc30 339 return insn->n;
c995fe94
ADG
340}
341
342/*
343+----------------------------------------------------------------------------+
344| Function Name : int i_APCI2200_ReadDigitalOutput |
90035c08 345| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
356cdbcb 346| unsigned int *data) |
c995fe94
ADG
347+----------------------------------------------------------------------------+
348| Task : Read value of the selected channel or port |
349+----------------------------------------------------------------------------+
71b5f4f1 350| Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 351| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 352| struct comedi_insn *insn :pointer to insn structure |
790c5541 353| unsigned int *data : Data Pointer to read status |
c995fe94
ADG
354+----------------------------------------------------------------------------+
355| Output Parameters : -- |
356+----------------------------------------------------------------------------+
357| Return Value : TRUE : No error occur |
358| : FALSE : Error occur. Return the error |
359| |
360+----------------------------------------------------------------------------+
361*/
362
da91b269
BP
363int i_APCI2200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
364 struct comedi_insn *insn, unsigned int *data)
c995fe94 365{
843690b7 366 struct addi_private *devpriv = dev->private;
117102b0 367 unsigned int ui_Temp;
2696fb57 368 unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
843690b7 369
c995fe94
ADG
370 ui_Temp = data[0];
371 *data = inw(devpriv->iobase + APCI2200_DIGITAL_OP);
372 if (ui_Temp == 0) {
373 *data = (*data >> ui_NoOfChannel) & 0x1;
2696fb57 374 } /* if(ui_Temp==0) */
c995fe94
ADG
375 else {
376 if (ui_Temp == 1) {
377 switch (ui_NoOfChannel) {
378
379 case 2:
380 *data = (*data >> (2 * data[1])) & 3;
381 break;
382
383 case 4:
384 *data = (*data >> (4 * data[1])) & 15;
385 break;
386
387 case 8:
388 *data = (*data >> (8 * data[1])) & 255;
389 break;
390
391 case 15:
392 break;
393
394 default:
395 comedi_error(dev, " chan spec wrong");
2696fb57 396 return -EINVAL; /* "sorry channel spec wrong " */
c995fe94 397
2696fb57
BP
398 } /* switch(ui_NoOfChannels) */
399 } /* if(ui_Temp==1) */
c995fe94
ADG
400 else {
401 printk("\nSpecified channel not supported \n");
2696fb57
BP
402 } /* elseif(ui_Temp==1) */
403 } /* elseif(ui_Temp==0) */
c995fe94
ADG
404 return insn->n;
405}
406
407/*
408+----------------------------------------------------------------------------+
71b5f4f1 409| Function Name : int i_APCI2200_ConfigWatchdog(struct comedi_device *dev,
356cdbcb 410| struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
c995fe94
ADG
411| |
412+----------------------------------------------------------------------------+
413| Task : Configures The Watchdog |
414+----------------------------------------------------------------------------+
71b5f4f1 415| Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 416| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 417| struct comedi_insn *insn :pointer to insn structure |
790c5541 418| unsigned int *data : Data Pointer to read status |
c995fe94
ADG
419+----------------------------------------------------------------------------+
420| Output Parameters : -- |
421+----------------------------------------------------------------------------+
422| Return Value : TRUE : No error occur |
423| : FALSE : Error occur. Return the error |
424| |
425+----------------------------------------------------------------------------+
426*/
427
da91b269
BP
428int i_APCI2200_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
429 struct comedi_insn *insn, unsigned int *data)
c995fe94 430{
843690b7
HS
431 struct addi_private *devpriv = dev->private;
432
c995fe94 433 if (data[0] == 0) {
2696fb57 434 /* Disable the watchdog */
c995fe94
ADG
435 outw(0x0,
436 devpriv->iobase + APCI2200_WATCHDOG +
437 APCI2200_WATCHDOG_ENABLEDISABLE);
2696fb57 438 /* Loading the Reload value */
c995fe94
ADG
439 outw(data[1],
440 devpriv->iobase + APCI2200_WATCHDOG +
441 APCI2200_WATCHDOG_RELOAD_VALUE);
442 data[1] = data[1] >> 16;
443 outw(data[1],
444 devpriv->iobase + APCI2200_WATCHDOG +
445 APCI2200_WATCHDOG_RELOAD_VALUE + 2);
2696fb57 446 } /* if(data[0]==0) */
c995fe94
ADG
447 else {
448 printk("\nThe input parameters are wrong\n");
449 return -EINVAL;
2696fb57 450 } /* elseif(data[0]==0) */
c995fe94
ADG
451
452 return insn->n;
453}
454
455 /*
456 +----------------------------------------------------------------------------+
457 | Function Name : int i_APCI2200_StartStopWriteWatchdog |
34c43922 458 | (struct comedi_device *dev,struct comedi_subdevice *s,
90035c08 459 struct comedi_insn *insn,unsigned int *data); |
c995fe94
ADG
460 +----------------------------------------------------------------------------+
461 | Task : Start / Stop The Watchdog |
462 +----------------------------------------------------------------------------+
71b5f4f1 463 | Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 464 | struct comedi_subdevice *s, :pointer to subdevice structure
90035c08 465 struct comedi_insn *insn :pointer to insn structure |
790c5541 466 | unsigned int *data : Data Pointer to read status |
c995fe94
ADG
467 +----------------------------------------------------------------------------+
468 | Output Parameters : -- |
469 +----------------------------------------------------------------------------+
470 | Return Value : TRUE : No error occur |
471 | : FALSE : Error occur. Return the error |
472 | |
473 +----------------------------------------------------------------------------+
474 */
475
da91b269
BP
476int i_APCI2200_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
477 struct comedi_insn *insn, unsigned int *data)
c995fe94 478{
843690b7
HS
479 struct addi_private *devpriv = dev->private;
480
c995fe94 481 switch (data[0]) {
2696fb57
BP
482 case 0: /* stop the watchdog */
483 outw(0x0, devpriv->iobase + APCI2200_WATCHDOG + APCI2200_WATCHDOG_ENABLEDISABLE); /* disable the watchdog */
c995fe94 484 break;
2696fb57 485 case 1: /* start the watchdog */
c995fe94
ADG
486 outw(0x0001,
487 devpriv->iobase + APCI2200_WATCHDOG +
488 APCI2200_WATCHDOG_ENABLEDISABLE);
489 break;
2696fb57 490 case 2: /* Software trigger */
c995fe94
ADG
491 outw(0x0201,
492 devpriv->iobase + APCI2200_WATCHDOG +
493 APCI2200_WATCHDOG_ENABLEDISABLE);
494 break;
495 default:
496 printk("\nSpecified functionality does not exist\n");
497 return -EINVAL;
2696fb57 498 } /* switch(data[0]) */
c995fe94
ADG
499 return insn->n;
500}
501
502/*
503+----------------------------------------------------------------------------+
504| Function Name : int i_APCI2200_ReadWatchdog |
90035c08 505| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
356cdbcb 506| unsigned int *data); |
c995fe94
ADG
507+----------------------------------------------------------------------------+
508| Task : Read The Watchdog |
509+----------------------------------------------------------------------------+
71b5f4f1 510| Input Parameters : struct comedi_device *dev : Driver handle |
34c43922 511| struct comedi_subdevice *s, :pointer to subdevice structure
356cdbcb 512| struct comedi_insn *insn :pointer to insn structure |
790c5541 513| unsigned int *data : Data Pointer to read status |
c995fe94
ADG
514+----------------------------------------------------------------------------+
515| Output Parameters : -- |
516+----------------------------------------------------------------------------+
517| Return Value : TRUE : No error occur |
518| : FALSE : Error occur. Return the error |
519| |
520+----------------------------------------------------------------------------+
521*/
522
da91b269
BP
523int i_APCI2200_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
524 struct comedi_insn *insn, unsigned int *data)
c995fe94 525{
843690b7
HS
526 struct addi_private *devpriv = dev->private;
527
c995fe94
ADG
528 data[0] =
529 inw(devpriv->iobase + APCI2200_WATCHDOG +
530 APCI2200_WATCHDOG_STATUS) & 0x1;
531 return insn->n;
532}
533
534/*
535+----------------------------------------------------------------------------+
71b5f4f1 536| Function Name : int i_APCI2200_Reset(struct comedi_device *dev) | |
c995fe94
ADG
537+----------------------------------------------------------------------------+
538| Task :resets all the registers |
539+----------------------------------------------------------------------------+
71b5f4f1 540| Input Parameters : struct comedi_device *dev
c995fe94
ADG
541+----------------------------------------------------------------------------+
542| Output Parameters : -- |
543+----------------------------------------------------------------------------+
544| Return Value : |
545| |
546+----------------------------------------------------------------------------+
547*/
548
da91b269 549int i_APCI2200_Reset(struct comedi_device *dev)
c995fe94 550{
843690b7
HS
551 struct addi_private *devpriv = dev->private;
552
2696fb57 553 outw(0x0, devpriv->iobase + APCI2200_DIGITAL_OP); /* RESETS THE DIGITAL OUTPUTS */
c995fe94
ADG
554 outw(0x0,
555 devpriv->iobase + APCI2200_WATCHDOG +
556 APCI2200_WATCHDOG_ENABLEDISABLE);
557 outw(0x0,
558 devpriv->iobase + APCI2200_WATCHDOG +
559 APCI2200_WATCHDOG_RELOAD_VALUE);
560 outw(0x0,
561 devpriv->iobase + APCI2200_WATCHDOG +
562 APCI2200_WATCHDOG_RELOAD_VALUE + 2);
563 return 0;
564}