aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/addi_apci_1564.c
diff options
context:
space:
mode:
authorChase Southwood <chase.southwood@gmail.com>2014-08-11 21:03:48 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-16 12:23:24 -0700
commit85d7c9ab5129e96d25b455d7bf45066c376e8e2d (patch)
tree0f556ac47aac6054a11e4807331c067ddaf56a1e /drivers/staging/comedi/drivers/addi_apci_1564.c
parentstaging: comedi: addi_apci_1564: Remove in-driver watchdog support code (diff)
downloadlinux-dev-85d7c9ab5129e96d25b455d7bf45066c376e8e2d.tar.xz
linux-dev-85d7c9ab5129e96d25b455d7bf45066c376e8e2d.zip
staging: comedi: addi_apci_1564: tidy register map defines
This commit performs a final tidying of the register map defines, bringing them to a state that is ready for merging into addi_apci_1564.c when the time comes. Actions performed include: *Removes the APCI1564_ADDRESS_RANGE macro, which is no longer needed/used. *Renames the APCI1564_DIGITAL_OP_{VCC,CC}_INTERRUPT_{ENABLE,DISABLE} macros to shorter names which are more consistent with the digital input interrupt macros. *Fixes a typo in a comment (dev>iobase changed to dev->iobase). *Renames the APCI1564_TCW_* macros to APCI1564_COUNTER_* names to more accurately reflect that they are only offsets to counter registers (since only the counters are offset from dev->iobase). Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengraver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_apci_1564.c')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_1564.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 555e0a9f04c5..16c02c855a65 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -42,10 +42,10 @@ static int apci1564_reset(struct comedi_device *dev)
outl(0x0, devpriv->amcc_iobase + APCI1564_TIMER_RELOAD_REG);
/* Reset the counter registers */
- outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
- outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
- outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
- outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
+ outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(APCI1564_COUNTER1));
+ outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(APCI1564_COUNTER2));
+ outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(APCI1564_COUNTER3));
+ outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(APCI1564_COUNTER4));
return 0;
}
@@ -94,17 +94,20 @@ static irqreturn_t apci1564_interrupt(int irq, void *d)
}
for (chan = 0; chan < 4; chan++) {
- status = inl(dev->iobase + APCI1564_TCW_IRQ_REG(chan));
+ status = inl(dev->iobase + APCI1564_COUNTER_IRQ_REG(chan));
if (status & 0x01) {
/* Disable Counter Interrupt */
- ctrl = inl(dev->iobase + APCI1564_TCW_CTRL_REG(chan));
- outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(chan));
+ ctrl = inl(dev->iobase +
+ APCI1564_COUNTER_CTRL_REG(chan));
+ outl(0x0, dev->iobase +
+ APCI1564_COUNTER_CTRL_REG(chan));
/* Send a signal to from kernel to user space */
send_sig(SIGIO, devpriv->tsk_current, 0);
/* Enable Counter Interrupt */
- outl(ctrl, dev->iobase + APCI1564_TCW_CTRL_REG(chan));
+ outl(ctrl, dev->iobase +
+ APCI1564_COUNTER_CTRL_REG(chan));
}
}