49 #include <linux/kernel.h>
50 #include <linux/module.h>
51 #include <linux/sched.h>
53 #include <linux/errno.h>
57 #include <linux/timex.h>
59 #include <linux/pci.h>
62 #include "../../comedidev.h"
63 #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300)
66 #include "../comedi_fc.h"
71 #ifndef ADDIDATA_DRIVER_NAME
72 #define ADDIDATA_DRIVER_NAME "addi_common"
79 #define devpriv ((struct addi_private *)dev->private)
80 #define this_board ((const struct addi_board *)dev->board_ptr)
82 #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300)
99 #if (defined (CONFIG_APCI_3120) || defined (CONFIG_APCI_3001))
102 #ifdef CONFIG_APCI_1032
105 #ifdef CONFIG_APCI_1516
108 #ifdef CONFIG_APCI_2016
111 #ifdef CONFIG_APCI_2032
114 #ifdef CONFIG_APCI_2200
117 #ifdef CONFIG_APCI_1564
120 #ifdef CONFIG_APCI_1500
123 #ifdef CONFIG_APCI_3501
126 #ifdef CONFIG_APCI_035
129 #if (defined (CONFIG_APCI_3200) || defined (CONFIG_APCI_3300))
132 #ifdef CONFIG_APCI_1710
135 #ifdef CONFIG_APCI_16XX
138 #ifdef CONFIG_APCI_3XXX
142 #ifndef COMEDI_SUBD_TTLIO
143 #define COMEDI_SUBD_TTLIO 11
147 #ifdef CONFIG_APCI_3120
150 #ifdef CONFIG_APCI_1032
153 #ifdef CONFIG_APCI_1516
156 #ifdef CONFIG_APCI_2016
159 #ifdef CONFIG_APCI_2032
162 #ifdef CONFIG_APCI_2200
165 #ifdef CONFIG_APCI_1564
168 #ifdef CONFIG_APCI_1500
171 #ifdef CONFIG_APCI_3001
174 #ifdef CONFIG_APCI_3501
177 #ifdef CONFIG_APCI_035
180 #ifdef CONFIG_APCI_3200
183 #ifdef CONFIG_APCI_3300
186 #ifdef CONFIG_APCI_1710
189 #ifdef CONFIG_APCI_16XX
193 #ifdef CONFIG_APCI_3XXX
225 static const struct addi_board boardtypes[] = {
226 #ifdef CONFIG_APCI_3120
228 .pc_DriverName =
"apci3120",
230 .i_DeviceId = 0x818D,
235 .i_NbrAiChannel = 16,
236 .i_NbrAiChannelDiff = 8,
237 .i_AiChannelList = 16,
239 .i_AiMaxdata = 0xffff,
240 .i_AoMaxdata = 0x3fff,
241 .pr_AiRangelist = &range_apci3120_ai,
242 .pr_AoRangelist = &range_apci3120_ao,
248 .b_AvailableConvertUnit = 1,
249 .ui_MinAcquisitiontimeNs = 10000,
250 .ui_MinDelaytimeNs = 100000,
269 #ifdef CONFIG_APCI_1032
271 .pc_DriverName =
"apci1032",
273 .i_DeviceId = 0x1003,
278 .i_NbrDiChannel = 32,
279 .interrupt = v_APCI1032_Interrupt,
286 #ifdef CONFIG_APCI_1516
288 .pc_DriverName =
"apci1516",
290 .i_DeviceId = 0x1001,
291 .i_IorangeBase0 = 128,
293 .i_IorangeBase2 = 32,
310 #ifdef CONFIG_APCI_2016
312 .pc_DriverName =
"apci2016",
314 .i_DeviceId = 0x1002,
315 .i_IorangeBase0 = 128,
317 .i_IorangeBase2 = 32,
320 .i_NbrDoChannel = 16,
331 #ifdef CONFIG_APCI_2032
333 .pc_DriverName =
"apci2032",
335 .i_DeviceId = 0x1004,
340 .i_NbrDoChannel = 32,
341 .i_DoMaxdata = 0xffffffff,
354 #ifdef CONFIG_APCI_2200
356 .pc_DriverName =
"apci2200",
358 .i_DeviceId = 0x1005,
364 .i_NbrDoChannel = 16,
377 #ifdef CONFIG_APCI_1564
379 .pc_DriverName =
"apci1564",
381 .i_DeviceId = 0x1006,
382 .i_IorangeBase0 = 128,
386 .i_NbrDiChannel = 32,
387 .i_NbrDoChannel = 32,
388 .i_DoMaxdata = 0xffffffff,
390 .interrupt = v_APCI1564_Interrupt,
404 #ifdef CONFIG_APCI_1500
406 .pc_DriverName =
"apci1500",
408 .i_DeviceId = 0x80fc,
409 .i_IorangeBase0 = 128,
413 .i_NbrDiChannel = 16,
414 .i_NbrDoChannel = 16,
415 .i_DoMaxdata = 0xffff,
417 .interrupt = v_APCI1500_Interrupt,
418 .reset = i_APCI1500_Reset,
419 .di_config = i_APCI1500_ConfigDigitalInputEvent,
420 .di_read = i_APCI1500_Initialisation,
421 .di_write = i_APCI1500_StartStopInputEvent,
422 .di_bits = i_APCI1500_ReadMoreDigitalInput,
423 .do_config = i_APCI1500_ConfigDigitalOutputErrorInterrupt,
424 .do_write = i_APCI1500_WriteDigitalOutput,
425 .do_bits = i_APCI1500_ConfigureInterrupt,
426 .timer_config = i_APCI1500_ConfigCounterTimerWatchdog,
427 .timer_write = i_APCI1500_StartStopTriggerTimerCounterWatchdog,
428 .timer_read = i_APCI1500_ReadInterruptMask,
429 .timer_bits = i_APCI1500_ReadCounterTimerWatchdog,
432 #ifdef CONFIG_APCI_3001
434 .pc_DriverName =
"apci3001",
436 .i_DeviceId = 0x828D,
441 .i_NbrAiChannel = 16,
442 .i_NbrAiChannelDiff = 8,
443 .i_AiChannelList = 16,
444 .i_AiMaxdata = 0xfff,
445 .pr_AiRangelist = &range_apci3120_ai,
451 .b_AvailableConvertUnit = 1,
452 .ui_MinAcquisitiontimeNs = 10000,
453 .ui_MinDelaytimeNs = 100000,
471 #ifdef CONFIG_APCI_3501
473 .pc_DriverName =
"apci3501",
475 .i_DeviceId = 0x3001,
476 .i_IorangeBase0 = 64,
480 .i_AoMaxdata = 16383,
481 .pr_AoRangelist = &range_apci3501_ao,
499 #ifdef CONFIG_APCI_035
501 .pc_DriverName =
"apci035",
503 .i_DeviceId = 0x0300,
504 .i_IorangeBase0 = 127,
508 .i_NbrAiChannel = 16,
509 .i_NbrAiChannelDiff = 8,
510 .i_AiChannelList = 16,
512 .pr_AiRangelist = &range_apci035_ai,
514 .ui_MinAcquisitiontimeNs = 10000,
515 .ui_MinDelaytimeNs = 100000,
516 .interrupt = v_APCI035_Interrupt,
525 #ifdef CONFIG_APCI_3200
527 .pc_DriverName =
"apci3200",
529 .i_DeviceId = 0x3000,
530 .i_IorangeBase0 = 128,
531 .i_IorangeBase1 = 256,
536 .i_NbrAiChannel = 16,
537 .i_NbrAiChannelDiff = 8,
538 .i_AiChannelList = 16,
539 .i_AiMaxdata = 0x3ffff,
540 .pr_AiRangelist = &range_apci3200_ai,
543 .ui_MinAcquisitiontimeNs = 10000,
544 .ui_MinDelaytimeNs = 100000,
560 #ifdef CONFIG_APCI_3300
563 .pc_DriverName =
"apci3300",
565 .i_DeviceId = 0x3007,
566 .i_IorangeBase0 = 128,
567 .i_IorangeBase1 = 256,
572 .i_NbrAiChannelDiff = 8,
573 .i_AiChannelList = 8,
574 .i_AiMaxdata = 0x3ffff,
575 .pr_AiRangelist = &range_apci3300_ai,
578 .ui_MinAcquisitiontimeNs = 10000,
579 .ui_MinDelaytimeNs = 100000,
595 #ifdef CONFIG_APCI_1710
597 .pc_DriverName =
"apci1710",
600 .i_IorangeBase0 = 128,
602 .i_IorangeBase2 = 256,
608 #ifdef CONFIG_APCI_16XX
610 .pc_DriverName =
"apci1648",
612 .i_DeviceId = 0x1009,
613 .i_IorangeBase0 = 128,
615 .i_NbrTTLChannel = 48,
622 .pc_DriverName =
"apci1696",
624 .i_DeviceId = 0x100A,
625 .i_IorangeBase0 = 128,
627 .i_NbrTTLChannel = 96,
635 #ifdef CONFIG_APCI_3XXX
637 .pc_DriverName =
"apci3000-16",
639 .i_DeviceId = 0x3010,
640 .i_IorangeBase0 = 256,
641 .i_IorangeBase1 = 256,
642 .i_IorangeBase2 = 256,
643 .i_IorangeBase3 = 256,
646 .i_NbrAiChannel = 16,
647 .i_NbrAiChannelDiff = 8,
648 .i_AiChannelList = 16,
650 .pr_AiRangelist = &range_apci3XXX_ai,
651 .i_NbrTTLChannel = 24,
652 .b_AvailableConvertUnit = 6,
653 .ui_MinAcquisitiontimeNs = 10000,
654 .interrupt = v_APCI3XXX_Interrupt,
655 .reset = i_APCI3XXX_Reset,
656 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
657 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
658 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
659 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
660 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
661 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
663 .pc_DriverName =
"apci3000-8",
665 .i_DeviceId = 0x300F,
666 .i_IorangeBase0 = 256,
667 .i_IorangeBase1 = 256,
668 .i_IorangeBase2 = 256,
669 .i_IorangeBase3 = 256,
673 .i_NbrAiChannelDiff = 4,
674 .i_AiChannelList = 8,
676 .pr_AiRangelist = &range_apci3XXX_ai,
677 .i_NbrTTLChannel = 24,
678 .b_AvailableConvertUnit = 6,
679 .ui_MinAcquisitiontimeNs = 10000,
680 .interrupt = v_APCI3XXX_Interrupt,
681 .reset = i_APCI3XXX_Reset,
682 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
683 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
684 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
685 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
686 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
687 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
689 .pc_DriverName =
"apci3000-4",
691 .i_DeviceId = 0x300E,
692 .i_IorangeBase0 = 256,
693 .i_IorangeBase1 = 256,
694 .i_IorangeBase2 = 256,
695 .i_IorangeBase3 = 256,
699 .i_NbrAiChannelDiff = 2,
700 .i_AiChannelList = 4,
702 .pr_AiRangelist = &range_apci3XXX_ai,
703 .i_NbrTTLChannel = 24,
704 .b_AvailableConvertUnit = 6,
705 .ui_MinAcquisitiontimeNs = 10000,
706 .interrupt = v_APCI3XXX_Interrupt,
707 .reset = i_APCI3XXX_Reset,
708 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
709 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
710 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
711 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
712 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
713 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
715 .pc_DriverName =
"apci3006-16",
717 .i_DeviceId = 0x3013,
718 .i_IorangeBase0 = 256,
719 .i_IorangeBase1 = 256,
720 .i_IorangeBase2 = 256,
721 .i_IorangeBase3 = 256,
724 .i_NbrAiChannel = 16,
725 .i_NbrAiChannelDiff = 8,
726 .i_AiChannelList = 16,
727 .i_AiMaxdata = 65535,
728 .pr_AiRangelist = &range_apci3XXX_ai,
729 .i_NbrTTLChannel = 24,
730 .b_AvailableConvertUnit = 6,
731 .ui_MinAcquisitiontimeNs = 10000,
732 .interrupt = v_APCI3XXX_Interrupt,
733 .reset = i_APCI3XXX_Reset,
734 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
735 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
736 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
737 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
738 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
739 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
741 .pc_DriverName =
"apci3006-8",
743 .i_DeviceId = 0x3014,
744 .i_IorangeBase0 = 256,
745 .i_IorangeBase1 = 256,
746 .i_IorangeBase2 = 256,
747 .i_IorangeBase3 = 256,
751 .i_NbrAiChannelDiff = 4,
752 .i_AiChannelList = 8,
753 .i_AiMaxdata = 65535,
754 .pr_AiRangelist = &range_apci3XXX_ai,
755 .i_NbrTTLChannel = 24,
756 .b_AvailableConvertUnit = 6,
757 .ui_MinAcquisitiontimeNs = 10000,
758 .interrupt = v_APCI3XXX_Interrupt,
759 .reset = i_APCI3XXX_Reset,
760 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
761 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
762 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
763 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
764 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
765 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
767 .pc_DriverName =
"apci3006-4",
769 .i_DeviceId = 0x3015,
770 .i_IorangeBase0 = 256,
771 .i_IorangeBase1 = 256,
772 .i_IorangeBase2 = 256,
773 .i_IorangeBase3 = 256,
777 .i_NbrAiChannelDiff = 2,
778 .i_AiChannelList = 4,
779 .i_AiMaxdata = 65535,
780 .pr_AiRangelist = &range_apci3XXX_ai,
781 .i_NbrTTLChannel = 24,
782 .b_AvailableConvertUnit = 6,
783 .ui_MinAcquisitiontimeNs = 10000,
784 .interrupt = v_APCI3XXX_Interrupt,
785 .reset = i_APCI3XXX_Reset,
786 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
787 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
788 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
789 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
790 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
791 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
793 .pc_DriverName =
"apci3010-16",
795 .i_DeviceId = 0x3016,
796 .i_IorangeBase0 = 256,
797 .i_IorangeBase1 = 256,
798 .i_IorangeBase2 = 256,
799 .i_IorangeBase3 = 256,
802 .i_NbrAiChannel = 16,
803 .i_NbrAiChannelDiff = 8,
804 .i_AiChannelList = 16,
806 .pr_AiRangelist = &range_apci3XXX_ai,
810 .i_NbrTTLChannel = 24,
811 .b_AvailableConvertUnit = 6,
812 .ui_MinAcquisitiontimeNs = 5000,
813 .interrupt = v_APCI3XXX_Interrupt,
814 .reset = i_APCI3XXX_Reset,
815 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
816 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
817 .di_read = i_APCI3XXX_InsnReadDigitalInput,
818 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
819 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
820 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
821 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
822 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
823 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
824 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
825 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
827 .pc_DriverName =
"apci3010-8",
829 .i_DeviceId = 0x3017,
830 .i_IorangeBase0 = 256,
831 .i_IorangeBase1 = 256,
832 .i_IorangeBase2 = 256,
833 .i_IorangeBase3 = 256,
837 .i_NbrAiChannelDiff = 4,
838 .i_AiChannelList = 8,
840 .pr_AiRangelist = &range_apci3XXX_ai,
844 .i_NbrTTLChannel = 24,
845 .b_AvailableConvertUnit = 6,
846 .ui_MinAcquisitiontimeNs = 5000,
847 .interrupt = v_APCI3XXX_Interrupt,
848 .reset = i_APCI3XXX_Reset,
849 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
850 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
851 .di_read = i_APCI3XXX_InsnReadDigitalInput,
852 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
853 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
854 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
855 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
856 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
857 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
858 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
859 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
861 .pc_DriverName =
"apci3010-4",
863 .i_DeviceId = 0x3018,
864 .i_IorangeBase0 = 256,
865 .i_IorangeBase1 = 256,
866 .i_IorangeBase2 = 256,
867 .i_IorangeBase3 = 256,
871 .i_NbrAiChannelDiff = 2,
872 .i_AiChannelList = 4,
874 .pr_AiRangelist = &range_apci3XXX_ai,
878 .i_NbrTTLChannel = 24,
879 .b_AvailableConvertUnit = 6,
880 .ui_MinAcquisitiontimeNs = 5000,
881 .interrupt = v_APCI3XXX_Interrupt,
882 .reset = i_APCI3XXX_Reset,
883 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
884 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
885 .di_read = i_APCI3XXX_InsnReadDigitalInput,
886 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
887 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
888 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
889 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
890 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
891 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
892 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
893 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
895 .pc_DriverName =
"apci3016-16",
897 .i_DeviceId = 0x3019,
898 .i_IorangeBase0 = 256,
899 .i_IorangeBase1 = 256,
900 .i_IorangeBase2 = 256,
901 .i_IorangeBase3 = 256,
904 .i_NbrAiChannel = 16,
905 .i_NbrAiChannelDiff = 8,
906 .i_AiChannelList = 16,
907 .i_AiMaxdata = 65535,
908 .pr_AiRangelist = &range_apci3XXX_ai,
912 .i_NbrTTLChannel = 24,
913 .b_AvailableConvertUnit = 6,
914 .ui_MinAcquisitiontimeNs = 5000,
915 .interrupt = v_APCI3XXX_Interrupt,
916 .reset = i_APCI3XXX_Reset,
917 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
918 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
919 .di_read = i_APCI3XXX_InsnReadDigitalInput,
920 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
921 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
922 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
923 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
924 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
925 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
926 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
927 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
929 .pc_DriverName =
"apci3016-8",
931 .i_DeviceId = 0x301A,
932 .i_IorangeBase0 = 256,
933 .i_IorangeBase1 = 256,
934 .i_IorangeBase2 = 256,
935 .i_IorangeBase3 = 256,
939 .i_NbrAiChannelDiff = 4,
940 .i_AiChannelList = 8,
941 .i_AiMaxdata = 65535,
942 .pr_AiRangelist = &range_apci3XXX_ai,
946 .i_NbrTTLChannel = 24,
947 .b_AvailableConvertUnit = 6,
948 .ui_MinAcquisitiontimeNs = 5000,
949 .interrupt = v_APCI3XXX_Interrupt,
950 .reset = i_APCI3XXX_Reset,
951 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
952 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
953 .di_read = i_APCI3XXX_InsnReadDigitalInput,
954 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
955 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
956 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
957 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
958 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
959 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
960 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
961 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
963 .pc_DriverName =
"apci3016-4",
965 .i_DeviceId = 0x301B,
966 .i_IorangeBase0 = 256,
967 .i_IorangeBase1 = 256,
968 .i_IorangeBase2 = 256,
969 .i_IorangeBase3 = 256,
973 .i_NbrAiChannelDiff = 2,
974 .i_AiChannelList = 4,
975 .i_AiMaxdata = 65535,
976 .pr_AiRangelist = &range_apci3XXX_ai,
980 .i_NbrTTLChannel = 24,
981 .b_AvailableConvertUnit = 6,
982 .ui_MinAcquisitiontimeNs = 5000,
983 .interrupt = v_APCI3XXX_Interrupt,
984 .reset = i_APCI3XXX_Reset,
985 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
986 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
987 .di_read = i_APCI3XXX_InsnReadDigitalInput,
988 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
989 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
990 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
991 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
992 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
993 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
994 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
995 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
997 .pc_DriverName =
"apci3100-16-4",
999 .i_DeviceId = 0x301C,
1000 .i_IorangeBase0 = 256,
1001 .i_IorangeBase1 = 256,
1002 .i_IorangeBase2 = 256,
1003 .i_IorangeBase3 = 256,
1006 .i_NbrAiChannel = 16,
1007 .i_NbrAiChannelDiff = 8,
1008 .i_AiChannelList = 16,
1009 .i_NbrAoChannel = 4,
1010 .i_AiMaxdata = 4095,
1011 .i_AoMaxdata = 4095,
1012 .pr_AiRangelist = &range_apci3XXX_ai,
1013 .pr_AoRangelist = &range_apci3XXX_ao,
1014 .i_NbrTTLChannel = 24,
1015 .b_AvailableConvertUnit = 6,
1016 .ui_MinAcquisitiontimeNs = 10000,
1017 .interrupt = v_APCI3XXX_Interrupt,
1018 .reset = i_APCI3XXX_Reset,
1019 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1020 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1021 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1022 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1023 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1024 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1025 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1027 .pc_DriverName =
"apci3100-8-4",
1029 .i_DeviceId = 0x301D,
1030 .i_IorangeBase0 = 256,
1031 .i_IorangeBase1 = 256,
1032 .i_IorangeBase2 = 256,
1033 .i_IorangeBase3 = 256,
1036 .i_NbrAiChannel = 8,
1037 .i_NbrAiChannelDiff = 4,
1038 .i_AiChannelList = 8,
1039 .i_NbrAoChannel = 4,
1040 .i_AiMaxdata = 4095,
1041 .i_AoMaxdata = 4095,
1042 .pr_AiRangelist = &range_apci3XXX_ai,
1043 .pr_AoRangelist = &range_apci3XXX_ao,
1044 .i_NbrTTLChannel = 24,
1045 .b_AvailableConvertUnit = 6,
1046 .ui_MinAcquisitiontimeNs = 10000,
1047 .interrupt = v_APCI3XXX_Interrupt,
1048 .reset = i_APCI3XXX_Reset,
1049 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1050 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1051 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1052 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1053 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1054 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1055 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1057 .pc_DriverName =
"apci3106-16-4",
1059 .i_DeviceId = 0x301E,
1060 .i_IorangeBase0 = 256,
1061 .i_IorangeBase1 = 256,
1062 .i_IorangeBase2 = 256,
1063 .i_IorangeBase3 = 256,
1066 .i_NbrAiChannel = 16,
1067 .i_NbrAiChannelDiff = 8,
1068 .i_AiChannelList = 16,
1069 .i_NbrAoChannel = 4,
1070 .i_AiMaxdata = 65535,
1071 .i_AoMaxdata = 4095,
1072 .pr_AiRangelist = &range_apci3XXX_ai,
1073 .pr_AoRangelist = &range_apci3XXX_ao,
1074 .i_NbrTTLChannel = 24,
1075 .b_AvailableConvertUnit = 6,
1076 .ui_MinAcquisitiontimeNs = 10000,
1077 .interrupt = v_APCI3XXX_Interrupt,
1078 .reset = i_APCI3XXX_Reset,
1079 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1080 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1081 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1082 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1083 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1084 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1085 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1087 .pc_DriverName =
"apci3106-8-4",
1089 .i_DeviceId = 0x301F,
1090 .i_IorangeBase0 = 256,
1091 .i_IorangeBase1 = 256,
1092 .i_IorangeBase2 = 256,
1093 .i_IorangeBase3 = 256,
1096 .i_NbrAiChannel = 8,
1097 .i_NbrAiChannelDiff = 4,
1098 .i_AiChannelList = 8,
1099 .i_NbrAoChannel = 4,
1100 .i_AiMaxdata = 65535,
1101 .i_AoMaxdata = 4095,
1102 .pr_AiRangelist = &range_apci3XXX_ai,
1103 .pr_AoRangelist = &range_apci3XXX_ao,
1104 .i_NbrTTLChannel = 24,
1105 .b_AvailableConvertUnit = 6,
1106 .ui_MinAcquisitiontimeNs = 10000,
1107 .interrupt = v_APCI3XXX_Interrupt,
1108 .reset = i_APCI3XXX_Reset,
1109 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1110 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1111 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1112 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1113 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1114 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1115 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1117 .pc_DriverName =
"apci3110-16-4",
1119 .i_DeviceId = 0x3020,
1120 .i_IorangeBase0 = 256,
1121 .i_IorangeBase1 = 256,
1122 .i_IorangeBase2 = 256,
1123 .i_IorangeBase3 = 256,
1126 .i_NbrAiChannel = 16,
1127 .i_NbrAiChannelDiff = 8,
1128 .i_AiChannelList = 16,
1129 .i_NbrAoChannel = 4,
1130 .i_AiMaxdata = 4095,
1131 .i_AoMaxdata = 4095,
1132 .pr_AiRangelist = &range_apci3XXX_ai,
1133 .pr_AoRangelist = &range_apci3XXX_ao,
1134 .i_NbrDiChannel = 4,
1135 .i_NbrDoChannel = 4,
1137 .i_NbrTTLChannel = 24,
1138 .b_AvailableConvertUnit = 6,
1139 .ui_MinAcquisitiontimeNs = 5000,
1140 .interrupt = v_APCI3XXX_Interrupt,
1141 .reset = i_APCI3XXX_Reset,
1142 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1143 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1144 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1145 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1146 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1147 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1148 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1149 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1150 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1151 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1152 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1153 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1155 .pc_DriverName =
"apci3110-8-4",
1157 .i_DeviceId = 0x3021,
1158 .i_IorangeBase0 = 256,
1159 .i_IorangeBase1 = 256,
1160 .i_IorangeBase2 = 256,
1161 .i_IorangeBase3 = 256,
1164 .i_NbrAiChannel = 8,
1165 .i_NbrAiChannelDiff = 4,
1166 .i_AiChannelList = 8,
1167 .i_NbrAoChannel = 4,
1168 .i_AiMaxdata = 4095,
1169 .i_AoMaxdata = 4095,
1170 .pr_AiRangelist = &range_apci3XXX_ai,
1171 .pr_AoRangelist = &range_apci3XXX_ao,
1172 .i_NbrDiChannel = 4,
1173 .i_NbrDoChannel = 4,
1175 .i_NbrTTLChannel = 24,
1176 .b_AvailableConvertUnit = 6,
1177 .ui_MinAcquisitiontimeNs = 5000,
1178 .interrupt = v_APCI3XXX_Interrupt,
1179 .reset = i_APCI3XXX_Reset,
1180 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1181 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1182 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1183 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1184 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1185 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1186 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1187 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1188 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1189 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1190 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1191 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1193 .pc_DriverName =
"apci3116-16-4",
1195 .i_DeviceId = 0x3022,
1196 .i_IorangeBase0 = 256,
1197 .i_IorangeBase1 = 256,
1198 .i_IorangeBase2 = 256,
1199 .i_IorangeBase3 = 256,
1202 .i_NbrAiChannel = 16,
1203 .i_NbrAiChannelDiff = 8,
1204 .i_AiChannelList = 16,
1205 .i_NbrAoChannel = 4,
1206 .i_AiMaxdata = 65535,
1207 .i_AoMaxdata = 4095,
1208 .pr_AiRangelist = &range_apci3XXX_ai,
1209 .pr_AoRangelist = &range_apci3XXX_ao,
1210 .i_NbrDiChannel = 4,
1211 .i_NbrDoChannel = 4,
1213 .i_NbrTTLChannel = 24,
1214 .b_AvailableConvertUnit = 6,
1215 .ui_MinAcquisitiontimeNs = 5000,
1216 .interrupt = v_APCI3XXX_Interrupt,
1217 .reset = i_APCI3XXX_Reset,
1218 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1219 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1220 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1221 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1222 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1223 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1224 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1225 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1226 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1227 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1228 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1229 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1231 .pc_DriverName =
"apci3116-8-4",
1233 .i_DeviceId = 0x3023,
1234 .i_IorangeBase0 = 256,
1235 .i_IorangeBase1 = 256,
1236 .i_IorangeBase2 = 256,
1237 .i_IorangeBase3 = 256,
1240 .i_NbrAiChannel = 8,
1241 .i_NbrAiChannelDiff = 4,
1242 .i_AiChannelList = 8,
1243 .i_NbrAoChannel = 4,
1244 .i_AiMaxdata = 65535,
1245 .i_AoMaxdata = 4095,
1246 .pr_AiRangelist = &range_apci3XXX_ai,
1247 .pr_AoRangelist = &range_apci3XXX_ao,
1248 .i_NbrDiChannel = 4,
1249 .i_NbrDoChannel = 4,
1251 .i_NbrTTLChannel = 24,
1252 .b_AvailableConvertUnit = 6,
1253 .ui_MinAcquisitiontimeNs = 5000,
1254 .interrupt = v_APCI3XXX_Interrupt,
1255 .reset = i_APCI3XXX_Reset,
1256 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1257 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1258 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1259 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1260 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1261 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1262 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1263 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1264 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1265 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1266 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1267 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1269 .pc_DriverName =
"apci3003",
1271 .i_DeviceId = 0x300B,
1272 .i_IorangeBase0 = 256,
1273 .i_IorangeBase1 = 256,
1274 .i_IorangeBase2 = 256,
1275 .i_IorangeBase3 = 256,
1278 .i_NbrAiChannelDiff = 4,
1279 .i_AiChannelList = 4,
1280 .i_AiMaxdata = 65535,
1281 .pr_AiRangelist = &range_apci3XXX_ai,
1282 .i_NbrDiChannel = 4,
1283 .i_NbrDoChannel = 4,
1285 .b_AvailableConvertUnit = 7,
1286 .ui_MinAcquisitiontimeNs = 2500,
1287 .interrupt = v_APCI3XXX_Interrupt,
1288 .reset = i_APCI3XXX_Reset,
1289 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1290 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1291 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1292 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1293 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1294 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1295 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1297 .pc_DriverName =
"apci3002-16",
1299 .i_DeviceId = 0x3002,
1300 .i_IorangeBase0 = 256,
1301 .i_IorangeBase1 = 256,
1302 .i_IorangeBase2 = 256,
1303 .i_IorangeBase3 = 256,
1306 .i_NbrAiChannelDiff = 16,
1307 .i_AiChannelList = 16,
1308 .i_AiMaxdata = 65535,
1309 .pr_AiRangelist = &range_apci3XXX_ai,
1310 .i_NbrDiChannel = 4,
1311 .i_NbrDoChannel = 4,
1313 .b_AvailableConvertUnit = 6,
1314 .ui_MinAcquisitiontimeNs = 5000,
1315 .interrupt = v_APCI3XXX_Interrupt,
1316 .reset = i_APCI3XXX_Reset,
1317 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1318 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1319 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1320 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1321 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1322 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1323 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1325 .pc_DriverName =
"apci3002-8",
1327 .i_DeviceId = 0x3003,
1328 .i_IorangeBase0 = 256,
1329 .i_IorangeBase1 = 256,
1330 .i_IorangeBase2 = 256,
1331 .i_IorangeBase3 = 256,
1334 .i_NbrAiChannelDiff = 8,
1335 .i_AiChannelList = 8,
1336 .i_AiMaxdata = 65535,
1337 .pr_AiRangelist = &range_apci3XXX_ai,
1338 .i_NbrDiChannel = 4,
1339 .i_NbrDoChannel = 4,
1341 .b_AvailableConvertUnit = 6,
1342 .ui_MinAcquisitiontimeNs = 5000,
1343 .interrupt = v_APCI3XXX_Interrupt,
1344 .reset = i_APCI3XXX_Reset,
1345 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1346 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1347 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1348 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1349 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1350 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1351 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1353 .pc_DriverName =
"apci3002-4",
1355 .i_DeviceId = 0x3004,
1356 .i_IorangeBase0 = 256,
1357 .i_IorangeBase1 = 256,
1358 .i_IorangeBase2 = 256,
1359 .i_IorangeBase3 = 256,
1362 .i_NbrAiChannelDiff = 4,
1363 .i_AiChannelList = 4,
1364 .i_AiMaxdata = 65535,
1365 .pr_AiRangelist = &range_apci3XXX_ai,
1366 .i_NbrDiChannel = 4,
1367 .i_NbrDoChannel = 4,
1369 .b_AvailableConvertUnit = 6,
1370 .ui_MinAcquisitiontimeNs = 5000,
1371 .interrupt = v_APCI3XXX_Interrupt,
1372 .reset = i_APCI3XXX_Reset,
1373 .ai_config = i_APCI3XXX_InsnConfigAnalogInput,
1374 .ai_read = i_APCI3XXX_InsnReadAnalogInput,
1375 .di_read = i_APCI3XXX_InsnReadDigitalInput,
1376 .di_bits = i_APCI3XXX_InsnBitsDigitalInput,
1377 .do_write = i_APCI3XXX_InsnWriteDigitalOutput,
1378 .do_bits = i_APCI3XXX_InsnBitsDigitalOutput,
1379 .do_read = i_APCI3XXX_InsnReadDigitalOutput,
1381 .pc_DriverName =
"apci3500",
1383 .i_DeviceId = 0x3024,
1384 .i_IorangeBase0 = 256,
1385 .i_IorangeBase1 = 256,
1386 .i_IorangeBase2 = 256,
1387 .i_IorangeBase3 = 256,
1390 .i_NbrAoChannel = 4,
1391 .i_AoMaxdata = 4095,
1392 .pr_AoRangelist = &range_apci3XXX_ao,
1393 .i_NbrTTLChannel = 24,
1394 .interrupt = v_APCI3XXX_Interrupt,
1395 .reset = i_APCI3XXX_Reset,
1396 .ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
1397 .ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
1398 .ttl_bits = i_APCI3XXX_InsnBitsTTLIO,
1399 .ttl_read = i_APCI3XXX_InsnReadTTLIO,
1400 .ttl_write = i_APCI3XXX_InsnWriteTTLIO,
1408 .attach = i_ADDI_Attach,
1409 .detach = i_ADDI_Detach,
1426 static struct pci_driver driver_addi_pci_driver = {
1427 .id_table = addi_apci_tbl,
1428 .probe = &driver_addi_pci_probe,
1432 static int __init driver_addi_init_module(
void)
1441 return pci_register_driver(&driver_addi_pci_driver);
1444 static void __exit driver_addi_cleanup_module(
void)
1477 unsigned int dw_Dummy;
1489 if (!pci_list_builded) {
1491 pci_list_builded = 1;
1509 if ((
i_pci_card_data(card, &pci_bus, &pci_slot, &pci_func, &io_addr[0],
1512 printk(
" - Can't get AMCC data!\n");
1516 iobase_a = io_addr[0];
1517 iobase_main = io_addr[1];
1518 iobase_addon = io_addr[2];
1519 iobase_reserved = io_addr[3];
1520 printk(
"\nBus %d: Slot %d: Funct%d\nBase0: 0x%8llx\nBase1: 0x%8llx\nBase2: 0x%8llx\nBase3: 0x%8llx\n", pci_bus, pci_slot, pci_func, (
unsigned long long)io_addr[0], (
unsigned long long)io_addr[1], (
unsigned long long)io_addr[2], (
unsigned long long)io_addr[3]);
1537 devpriv->i_IobaseAmcc = (
int) iobase_a;
1539 devpriv->i_IobaseReserved = (
int) iobase_reserved;
1545 devpriv->i_IobaseReserved = (
int) io_addr[3];
1546 printk(
"\nioremap begin");
1562 devpriv->s_EeParameters.ui_MinAcquisitiontimeNs =
1564 devpriv->s_EeParameters.ui_MinDelaytimeNs =
1572 printk(
", unable to allocate IRQ %u, DISABLING IT",
1579 printk(
", IRQ disabled");
1589 printk(
"\nPCI Eeprom used");
1598 dw_Dummy =
inl(
devpriv->i_IobaseAmcc + 0x38);
1599 outl(dw_Dummy | 0x2000,
devpriv->i_IobaseAmcc + 0x38);
1600 printk(
"\nEnable the interrupt for the controller");
1606 printk(
"\nPCI Eeprom unused");
1615 if (
devpriv->s_EeParameters.i_Dma) {
1619 devpriv->b_DmaDoubleBuffer = 0;
1620 for (i = 0; i < 2; i++) {
1621 for (pages = 4; pages >= 0; pages--) {
1625 if (
devpriv->ul_DmaBufferVirtual[i])
1628 if (
devpriv->ul_DmaBufferVirtual[i]) {
1634 ui_DmaBufferSize[
i] >> 1;
1637 ul_DmaBufferVirtual[i]);
1640 if (!
devpriv->ul_DmaBufferVirtual[0]) {
1642 (
", Can't allocate DMA buffer, DMA disabled!");
1646 if (
devpriv->ul_DmaBufferVirtual[1]) {
1647 devpriv->b_DmaDoubleBuffer = 1;
1652 printk(
"\nDMA ENABLED\n");
1654 printk(
"\nDMA DISABLED\n");
1659 #ifdef CONFIG_APCI_1710
1663 devpriv->s_BoardInfos.ui_Address = io_addr[2];
1673 if ((
devpriv->s_EeParameters.i_NbrAiChannel)
1680 if (
devpriv->s_EeParameters.i_NbrAiChannel) {
1682 devpriv->s_EeParameters.i_NbrAiChannel;
1693 devpriv->b_AiInitialisation = 1;
1709 if (
devpriv->s_EeParameters.i_NbrAoChannel) {
1715 devpriv->s_EeParameters.i_NbrAoChannel;
1724 if (
devpriv->s_EeParameters.i_NbrDiChannel) {
1730 devpriv->s_EeParameters.i_NbrDiChannel;
1742 if (
devpriv->s_EeParameters.i_NbrDoChannel) {
1749 devpriv->s_EeParameters.i_NbrDoChannel;
1764 if (
devpriv->s_EeParameters.i_Timer) {
1806 s->
insn_read = i_ADDIDATA_InsnReadEeprom;
1812 printk(
"\ni_ADDI_Attach end\n");
1829 if (
devpriv->ul_DmaBufferVirtual[0]) {
1831 ul_DmaBufferVirtual[0],
1832 devpriv->ui_DmaBufferPages[0]);
1834 if (
devpriv->ul_DmaBufferVirtual[1]) {
1836 ul_DmaBufferVirtual[1],
1837 devpriv->ui_DmaBufferPages[1]);
1844 if (pci_list_builded) {
1846 pci_list_builded = 0;
1926 unsigned short w_Data;
1927 unsigned short w_Address;
1931 this_board->pc_EepromChip, 0x100 + (2 * w_Address));