struct cb_pcidas_private {
struct comedi_8254 *ao_pacer;
/* base addresses */
- unsigned long s5933_config;
+ unsigned long amcc; /* pcibar0 */
unsigned long pcibar1;
unsigned long pcibar2;
unsigned long pcibar4;
struct cb_pcidas_private *devpriv = dev->private;
unsigned int status;
- status = inb(devpriv->s5933_config + AMCC_OP_REG_MCSR_NVCMD);
+ status = inb(devpriv->amcc + AMCC_OP_REG_MCSR_NVCMD);
if ((status & MCSR_NV_BUSY) == 0)
return 0;
return -EBUSY;
/* set address (chan) and read operation */
outb(MCSR_NV_ENABLE | MCSR_NV_LOAD_LOW_ADDR,
- devpriv->s5933_config + AMCC_OP_REG_MCSR_NVCMD);
- outb(chan & 0xff,
- devpriv->s5933_config + AMCC_OP_REG_MCSR_NVDATA);
+ devpriv->amcc + AMCC_OP_REG_MCSR_NVCMD);
+ outb(chan & 0xff, devpriv->amcc + AMCC_OP_REG_MCSR_NVDATA);
outb(MCSR_NV_ENABLE | MCSR_NV_LOAD_HIGH_ADDR,
- devpriv->s5933_config + AMCC_OP_REG_MCSR_NVCMD);
+ devpriv->amcc + AMCC_OP_REG_MCSR_NVCMD);
outb((chan >> 8) & 0xff,
- devpriv->s5933_config + AMCC_OP_REG_MCSR_NVDATA);
+ devpriv->amcc + AMCC_OP_REG_MCSR_NVDATA);
outb(MCSR_NV_ENABLE | MCSR_NV_READ,
- devpriv->s5933_config + AMCC_OP_REG_MCSR_NVCMD);
+ devpriv->amcc + AMCC_OP_REG_MCSR_NVCMD);
/* wait for data to be returned */
ret = comedi_timeout(dev, s, insn, cb_pcidas_eeprom_ready, 0);
if (ret)
return ret;
- data[i] = inb(devpriv->s5933_config + AMCC_OP_REG_MCSR_NVDATA);
+ data[i] = inb(devpriv->amcc + AMCC_OP_REG_MCSR_NVDATA);
}
return insn->n;
async = s->async;
cmd = &async->cmd;
- s5933_status = inl(devpriv->s5933_config + AMCC_OP_REG_INTCSR);
+ s5933_status = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);
if ((INTCSR_INTR_ASSERTED & s5933_status) == 0)
return IRQ_NONE;
/* make sure mailbox 4 is empty */
- inl_p(devpriv->s5933_config + AMCC_OP_REG_IMB4);
+ inl_p(devpriv->amcc + AMCC_OP_REG_IMB4);
/* clear interrupt on amcc s5933 */
outl(devpriv->s5933_intcsr_bits | INTCSR_INBOX_INTR_STATUS,
- devpriv->s5933_config + AMCC_OP_REG_INTCSR);
+ devpriv->amcc + AMCC_OP_REG_INTCSR);
status = inw(devpriv->pcibar1 + PCIDAS_CTRL_REG);
if (ret)
return ret;
- devpriv->s5933_config = pci_resource_start(pcidev, 0);
+ devpriv->amcc = pci_resource_start(pcidev, 0);
devpriv->pcibar1 = pci_resource_start(pcidev, 1);
devpriv->pcibar2 = pci_resource_start(pcidev, 2);
dev->iobase = pci_resource_start(pcidev, 3);
/* disable and clear interrupts on amcc s5933 */
outl(INTCSR_INBOX_INTR_STATUS,
- devpriv->s5933_config + AMCC_OP_REG_INTCSR);
+ devpriv->amcc + AMCC_OP_REG_INTCSR);
ret = request_irq(pcidev->irq, cb_pcidas_interrupt, IRQF_SHARED,
dev->board_name, dev);
}
/* make sure mailbox 4 is empty */
- inl(devpriv->s5933_config + AMCC_OP_REG_IMB4);
+ inl(devpriv->amcc + AMCC_OP_REG_IMB4);
/* Set bits to enable incoming mailbox interrupts on amcc s5933. */
devpriv->s5933_intcsr_bits =
INTCSR_INBOX_BYTE(3) | INTCSR_INBOX_SELECT(3) |
INTCSR_INBOX_FULL_INT;
/* clear and enable interrupt on amcc s5933 */
outl(devpriv->s5933_intcsr_bits | INTCSR_INBOX_INTR_STATUS,
- devpriv->s5933_config + AMCC_OP_REG_INTCSR);
+ devpriv->amcc + AMCC_OP_REG_INTCSR);
return 0;
}
struct cb_pcidas_private *devpriv = dev->private;
if (devpriv) {
- if (devpriv->s5933_config)
+ if (devpriv->amcc)
outl(INTCSR_INBOX_INTR_STATUS,
- devpriv->s5933_config + AMCC_OP_REG_INTCSR);
+ devpriv->amcc + AMCC_OP_REG_INTCSR);
kfree(devpriv->ao_pacer);
}
comedi_pci_detach(dev);