Commit c9a050cf authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: das16m1: tidy up queue register defines

Rename these defines.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ca99ee4
...@@ -80,11 +80,10 @@ ...@@ -80,11 +80,10 @@
#define DAS16M1_INTR_CTRL_PACER_MASK DAS16M1_INTR_CTRL_PACER(3) #define DAS16M1_INTR_CTRL_PACER_MASK DAS16M1_INTR_CTRL_PACER(3)
#define DAS16M1_INTR_CTRL_IRQ(x) (((x) & 0x7) << 4) #define DAS16M1_INTR_CTRL_IRQ(x) (((x) & 0x7) << 4)
#define DAS16M1_INTR_CTRL_INTE BIT(7) #define DAS16M1_INTR_CTRL_INTE BIT(7)
#define DAS16M1_QUEUE_ADDR 6 #define DAS16M1_Q_ADDR_REG 0x06
#define DAS16M1_QUEUE_DATA 7 #define DAS16M1_Q_REG 0x07
#define Q_CHAN(x) ((x) & 0x7) #define DAS16M1_Q_CHAN(x) (((x) & 0x7) << 0)
#define Q_RANGE(x) (((x) & 0xf) << 4) #define DAS16M1_Q_RANGE(x) (((x) & 0xf) << 4)
#define UNIPOLAR 0x40
#define DAS16M1_8254_FIRST 0x8 #define DAS16M1_8254_FIRST 0x8
#define DAS16M1_8254_SECOND 0xc #define DAS16M1_8254_SECOND 0xc
#define DAS16M1_82C55 0x400 #define DAS16M1_82C55 0x400
...@@ -247,11 +246,11 @@ static int das16m1_cmd_exec(struct comedi_device *dev, ...@@ -247,11 +246,11 @@ static int das16m1_cmd_exec(struct comedi_device *dev,
/* setup channel/gain queue */ /* setup channel/gain queue */
for (i = 0; i < cmd->chanlist_len; i++) { for (i = 0; i < cmd->chanlist_len; i++) {
outb(i, dev->iobase + DAS16M1_QUEUE_ADDR); outb(i, dev->iobase + DAS16M1_Q_ADDR_REG);
byte = byte =
Q_CHAN(CR_CHAN(cmd->chanlist[i])) | DAS16M1_Q_CHAN(CR_CHAN(cmd->chanlist[i])) |
Q_RANGE(CR_RANGE(cmd->chanlist[i])); DAS16M1_Q_RANGE(CR_RANGE(cmd->chanlist[i]));
outb(byte, dev->iobase + DAS16M1_QUEUE_DATA); outb(byte, dev->iobase + DAS16M1_Q_REG);
} }
/* enable interrupts and set internal pacer counter mode and counts */ /* enable interrupts and set internal pacer counter mode and counts */
...@@ -318,10 +317,10 @@ static int das16m1_ai_rinsn(struct comedi_device *dev, ...@@ -318,10 +317,10 @@ static int das16m1_ai_rinsn(struct comedi_device *dev,
int byte; int byte;
/* setup channel/gain queue */ /* setup channel/gain queue */
outb(0, dev->iobase + DAS16M1_QUEUE_ADDR); outb(0, dev->iobase + DAS16M1_Q_ADDR_REG);
byte = byte = DAS16M1_Q_CHAN(CR_CHAN(insn->chanspec)) |
Q_CHAN(CR_CHAN(insn->chanspec)) | Q_RANGE(CR_RANGE(insn->chanspec)); DAS16M1_Q_RANGE(CR_RANGE(insn->chanspec));
outb(byte, dev->iobase + DAS16M1_QUEUE_DATA); outb(byte, dev->iobase + DAS16M1_Q_REG);
for (n = 0; n < insn->n; n++) { for (n = 0; n < insn->n; n++) {
unsigned short val; unsigned short val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment