#include "amcc_s5933.h"
-#define ADVANTECH_VENDOR 0x13fe /* Advantech PCI vendor ID */
-
#define PCI171x_PARANOIDCHECK /* if defined, then is used code which control correct channel number on every 12 bit sample */
#undef PCI171X_EXTDEBUG
typedef struct {
char *name; // driver name
- int vendor_id; // PCI vendor a device ID of card
int device_id;
int iorange; // I/O range len
char have_irq; // 1=card support IRQ
} boardtype;
static struct pci_device_id pci1710_pci_table[] = __devinitdata {
- { ADVANTECH_VENDOR, 0x1710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { ADVANTECH_VENDOR, 0x1711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { ADVANTECH_VENDOR, 0x1713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { ADVANTECH_VENDOR, 0x1720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { ADVANTECH_VENDOR, 0x1731, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_ADVANTECH, 0x1710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_ADVANTECH, 0x1711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_ADVANTECH, 0x1713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_ADVANTECH, 0x1720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_ADVANTECH, 0x1731, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, pci1710_pci_table);
static boardtype boardtypes[] =
{
- {"pci1710", ADVANTECH_VENDOR, 0x1710,
+ {"pci1710", 0x1710,
IORANGE_171x, 1, TYPE_PCI171X,
16, 8, 2, 16, 16, 0x0fff, 0x0fff,
&range_pci1710_3, range_codes_pci1710_3, &range_pci171x_da,
10000, 2048 },
- {"pci1710hg", ADVANTECH_VENDOR, 0x1710,
+ {"pci1710hg", 0x1710,
IORANGE_171x, 1, TYPE_PCI171X,
16, 8, 2, 16, 16, 0x0fff, 0x0fff,
&range_pci1710hg, range_codes_pci1710hg, &range_pci171x_da,
10000, 2048 },
- {"pci1711", ADVANTECH_VENDOR, 0x1711,
+ {"pci1711", 0x1711,
IORANGE_171x, 1, TYPE_PCI171X,
16, 0, 2, 16, 16, 0x0fff, 0x0fff,
&range_pci17x1, range_codes_pci17x1, &range_pci171x_da,
10000, 512 },
- {"pci1713", ADVANTECH_VENDOR, 0x1713,
+ {"pci1713", 0x1713,
IORANGE_171x, 1, TYPE_PCI1713,
32,16, 0, 0, 0, 0x0fff, 0x0000,
&range_pci17x1, range_codes_pci1710_3, NULL,
10000, 2048 },
- {"pci1720", ADVANTECH_VENDOR, 0x1720,
+ {"pci1720", 0x1720,
IORANGE_1720, 0, TYPE_PCI1720,
0, 0, 4, 0, 0, 0x0000, 0x0fff,
NULL, NULL, &range_pci1720,
0, 0 },
- {"pci1731", ADVANTECH_VENDOR, 0x1731,
+ {"pci1731", 0x1731,
IORANGE_171x, 1, TYPE_PCI171X,
16, 0, 0, 16, 16, 0x0fff, 0x0000,
&range_pci17x1, range_codes_pci17x1, NULL,
unsigned char pci_bus,pci_slot,pci_func;
if (!pci_list_builded) {
- pci_card_list_init(ADVANTECH_VENDOR,
+ pci_card_list_init(PCI_VENDOR_ID_ADVANTECH,
#ifdef PCI171X_EXTDEBUG
1
#else
rt_printk("comedi%d: adv_pci1710: board=%s",dev->minor,this_board->name);
- if ((card=select_and_alloc_pci_card(ADVANTECH_VENDOR, this_board->device_id, it->options[0], it->options[1]))==NULL)
+ if ((card=select_and_alloc_pci_card(PCI_VENDOR_ID_ADVANTECH, this_board->device_id, it->options[0], it->options[1]))==NULL)
return -EIO;
if ((pci_card_data(card,&pci_bus,&pci_slot,&pci_func,
if (dev->iobase) release_region(dev->iobase,this_board->iorange);
if (pci_list_builded) {
- pci_card_list_cleanup(ADVANTECH_VENDOR);
+ pci_card_list_cleanup(PCI_VENDOR_ID_ADVANTECH);
pci_list_builded=0;
}
#define MAX_N_CALDACS (16+16+2)
-#define NI_VENDOR_ID 0x1093
/* The following two tables must be in the same order */
static struct pci_device_id ni_pci_table[] __devinitdata = {
- { NI_VENDOR_ID, 0x0162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1170, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x11d0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1180, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1190, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x11c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1270, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1350, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2a60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2a70, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2a80, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2ab0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2ca0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2c80, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x18b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x14e0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x14f0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1870, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x15b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x11b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x18c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x1580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { NI_VENDOR_ID, 0x2890, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x0162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1170, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x11d0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1180, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1190, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x11c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1270, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1350, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2a60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2a70, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2a80, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2ab0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2ca0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2c80, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x18b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x14e0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x14f0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1870, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x15b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x11b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x18c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x1580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NATINST, 0x2890, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, ni_pci_table);