#include "addi-data/addi_common.h"
-#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3xxx.c"
#ifndef COMEDI_SUBD_TTLIO
[BOARD_APCI3000_16] = {
.pc_DriverName = "apci3000-16",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3000_8] = {
.pc_DriverName = "apci3000-8",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3000_4] = {
.pc_DriverName = "apci3000-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 4,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
[BOARD_APCI3006_16] = {
.pc_DriverName = "apci3006-16",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3006_8] = {
.pc_DriverName = "apci3006-8",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3006_4] = {
.pc_DriverName = "apci3006-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 4,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
[BOARD_APCI3010_16] = {
.pc_DriverName = "apci3010-16",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3010_8] = {
.pc_DriverName = "apci3010-8",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3010_4] = {
.pc_DriverName = "apci3010-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 4,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
[BOARD_APCI3016_16] = {
.pc_DriverName = "apci3016-16",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3016_8] = {
.pc_DriverName = "apci3016-8",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3016_4] = {
.pc_DriverName = "apci3016-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 4,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
[BOARD_APCI3100_16_4] = {
.pc_DriverName = "apci3100-16-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3100_8_4] = {
.pc_DriverName = "apci3100-8-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3106_16_4] = {
.pc_DriverName = "apci3106-16-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3106_8_4] = {
.pc_DriverName = "apci3106-8-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3110_16_4] = {
.pc_DriverName = "apci3110-16-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3110_8_4] = {
.pc_DriverName = "apci3110-8-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3116_16_4] = {
.pc_DriverName = "apci3116-16-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
[BOARD_APCI3116_8_4] = {
.pc_DriverName = "apci3116-8-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannel = 8,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
[BOARD_APCI3003] = {
.pc_DriverName = "apci3003",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
[BOARD_APCI3002_16] = {
.pc_DriverName = "apci3002-16",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannelDiff = 16,
.i_AiChannelList = 16,
.i_AiMaxdata = 65535,
[BOARD_APCI3002_8] = {
.pc_DriverName = "apci3002-8",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 8,
.i_AiMaxdata = 65535,
[BOARD_APCI3002_4] = {
.pc_DriverName = "apci3002-4",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
[BOARD_APCI3500] = {
.pc_DriverName = "apci3500",
.i_IorangeBase1 = 256,
- .i_PCIEeprom = ADDIDATA_NO_EEPROM,
- .pc_EepromChip = ADDIDATA_9054,
.i_NbrAoChannel = 4,
.i_AoMaxdata = 4095,
.i_NbrTTLChannel = 24,
return insn->n;
}
-static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn,
- unsigned int *data)
-{
- const struct addi_board *this_board = comedi_board(dev);
- struct addi_private *devpriv = dev->private;
- unsigned short w_Address = CR_CHAN(insn->chanspec);
- unsigned short w_Data;
-
- w_Data = addi_eeprom_readw(devpriv->i_IobaseAmcc,
- this_board->pc_EepromChip, 2 * w_Address);
- data[0] = w_Data;
-
- return insn->n;
-}
-
static int apci3xxx_reset(struct comedi_device *dev)
{
struct addi_private *devpriv = dev->private;
struct addi_private *devpriv;
struct comedi_subdevice *s;
int ret, n_subdevices;
- unsigned int dw_Dummy;
if (context < ARRAY_SIZE(apci3xxx_boardtypes))
board = &apci3xxx_boardtypes[context];
dev->irq = pcidev->irq;
}
- /* Read eepeom and fill addi_board Structure */
-
- if (board->i_PCIEeprom) {
- if (!(strcmp(board->pc_EepromChip, "S5920"))) {
- /* Set 3 wait stait */
- if (!(strcmp(dev->board_name, "apci035")))
- outl(0x80808082, devpriv->i_IobaseAmcc + 0x60);
- else
- outl(0x83838383, devpriv->i_IobaseAmcc + 0x60);
-
- /* Enable the interrupt for the controller */
- dw_Dummy = inl(devpriv->i_IobaseAmcc + 0x38);
- outl(dw_Dummy | 0x2000, devpriv->i_IobaseAmcc + 0x38);
- }
- addi_eeprom_read_info(dev, pci_resource_start(pcidev, 0));
- }
-
n_subdevices = 7;
ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret)
/* EEPROM */
s = &dev->subdevices[6];
- if (board->i_PCIEeprom) {
- s->type = COMEDI_SUBD_MEMORY;
- s->subdev_flags = SDF_READABLE | SDF_INTERNAL;
- s->n_chan = 256;
- s->maxdata = 0xffff;
- s->insn_read = i_ADDIDATA_InsnReadEeprom;
- } else {
- s->type = COMEDI_SUBD_UNUSED;
- }
+ s->type = COMEDI_SUBD_UNUSED;
apci3xxx_reset(dev);
return 0;