55 static int i_WatchdogNbr = 0;
56 static int i_Temp = 0;
57 static int i_Flag = 1;
115 unsigned int ui_Status = 0;
116 unsigned int ui_Command = 0;
117 unsigned int ui_Mode = 0;
120 devpriv->b_TimerSelectMode = data[0];
121 i_WatchdogNbr = data[1];
130 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
132 ui_Command =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
136 outl(data[3],
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 4);
140 outl(data[2],
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 8);
154 (ui_Command & 0xFFF719E2
UL) | ui_Mode << 13
UL | 0x10UL;
169 ui_Command = ui_Command & 0xFFF819E2
UL;
172 printk(
"\n The parameter for Timer/watchdog selection is in error\n");
176 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
178 ui_Command =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
182 ui_Command = ui_Command & 0xFFFFF89F
UL;
187 ui_Command = ui_Command | (data[5] << 5);
189 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
191 ui_Command =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
195 ui_Command = ui_Command & 0xFFFFF87F
UL;
200 ui_Command = ui_Command | (data[7] << 7);
202 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
204 ui_Command =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
208 ui_Command = ui_Command & 0xFFFFF9FB
UL;
212 ui_Command = ui_Command | (data[8] << 2);
213 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
219 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 24);
224 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 28);
228 ui_Command =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
232 ui_Command = ui_Command & 0xFFFFF9F7
UL;
236 ui_Command = ui_Command | (data[12] << 3);
237 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
242 ui_Command =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
246 ui_Status =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 16);
248 ui_Command = (ui_Command & 0xFFFFF9FD
UL) | (data[13] << 1);
249 outl(ui_Command,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
284 unsigned int ui_Command = 0;
288 inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
292 ui_Command = (ui_Command & 0xFFFFF9FF
UL) | 0x1UL;
294 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
298 inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
302 ui_Command = (ui_Command & 0xFFFFF9FF
UL) | 0x200UL;
304 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
316 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
321 for (i_Count = 1; i_Count <= 4; i_Count++) {
327 i_WatchdogNbr = i_Count;
329 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) +
337 for (i_Count = 1; i_Count <= 4; i_Count++) {
343 i_WatchdogNbr = i_Count;
345 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) +
352 for (i_Count = 1; i_Count <= 4; i_Count++) {
359 i_WatchdogNbr = i_Count;
361 devpriv->iobase + ((i_WatchdogNbr - 1) * 32) +
399 unsigned int ui_Status = 0;
400 i_WatchdogNbr = insn->
unused[0];
406 ui_Status =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 16);
412 data[0] = ((ui_Status >> 1) & 1);
416 data[1] = ((ui_Status >> 2) & 1);
420 data[2] = ((ui_Status >> 3) & 1);
424 data[3] = ((ui_Status >> 0) & 1);
426 data[4] =
inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 0);
496 unsigned int ui_CommandRegister = 0;
500 ui_CommandRegister = 0x80000;
504 outl(ui_CommandRegister,
devpriv->iobase + 128 + 8);
531 for (i_Count = 1; i_Count <= 4; i_Count++) {
532 i_WatchdogNbr = i_Count;
533 outl(0x0,
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 0);
557 static void v_APCI035_Interrupt(
int irq,
void *
d)
560 unsigned int ui_StatusRegister1 = 0;
561 unsigned int ui_StatusRegister2 = 0;
562 unsigned int ui_ReadCommand = 0;
563 unsigned int ui_ChannelNumber = 0;
564 unsigned int ui_DigitalTemperature = 0;
566 i_WatchdogNbr = i_Flag;
572 ui_StatusRegister1 =
inl(
devpriv->iobase + 128 + 16);
578 inl(
devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 20);
580 if ((((ui_StatusRegister1) & 0x8) == 0x8))
585 ui_ReadCommand =
inl(
devpriv->iobase + 128 + 12);
586 ui_ReadCommand = ui_ReadCommand & 0xFFDF0000
UL;
591 ui_ChannelNumber =
inl(
devpriv->iobase + 128 + 60);
595 ui_DigitalTemperature =
inl(
devpriv->iobase + 128 + 60);
600 if ((ui_StatusRegister2 & 0x1) == 0x1) {