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

staging: comedi: das16m1: tidy up 8254/8255 register defines

For aesthetics, 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 702907d7
......@@ -84,10 +84,10 @@
#define DAS16M1_Q_REG 0x07
#define DAS16M1_Q_CHAN(x) (((x) & 0x7) << 0)
#define DAS16M1_Q_RANGE(x) (((x) & 0xf) << 4)
#define DAS16M1_8254_FIRST 0x8
#define DAS16M1_8254_SECOND 0xc
#define DAS16M1_82C55 0x400
#define DAS16M1_8254_THIRD 0x404
#define DAS16M1_8254_IOBASE1 0x08
#define DAS16M1_8254_IOBASE2 0x0c
#define DAS16M1_8255_IOBASE 0x400
#define DAS16M1_8254_IOBASE3 0x404
static const struct comedi_lrange range_das16m1 = {
9, {
......@@ -524,12 +524,12 @@ static int das16m1_attach(struct comedi_device *dev,
ret = comedi_request_region(dev, it->options[0], 0x10);
if (ret)
return ret;
/* Request an additional region for the 8255 */
ret = __comedi_request_region(dev, dev->iobase + DAS16M1_82C55,
/* Request an additional region for the 8255 and 3rd 8254 */
ret = __comedi_request_region(dev, dev->iobase + DAS16M1_8255_IOBASE,
DAS16M1_SIZE2);
if (ret)
return ret;
devpriv->extra_iobase = dev->iobase + DAS16M1_82C55;
devpriv->extra_iobase = dev->iobase + DAS16M1_8255_IOBASE;
/* only irqs 2, 3, 4, 5, 6, 7, 10, 11, 12, 14, and 15 are valid */
if ((1 << it->options[1]) & 0xdcfc) {
......@@ -539,12 +539,12 @@ static int das16m1_attach(struct comedi_device *dev,
dev->irq = it->options[1];
}
dev->pacer = comedi_8254_init(dev->iobase + DAS16M1_8254_SECOND,
dev->pacer = comedi_8254_init(dev->iobase + DAS16M1_8254_IOBASE2,
I8254_OSC_BASE_10MHZ, I8254_IO8, 0);
if (!dev->pacer)
return -ENOMEM;
devpriv->counter = comedi_8254_init(dev->iobase + DAS16M1_8254_FIRST,
devpriv->counter = comedi_8254_init(dev->iobase + DAS16M1_8254_IOBASE1,
0, I8254_IO8, 0);
if (!devpriv->counter)
return -ENOMEM;
......@@ -589,9 +589,9 @@ static int das16m1_attach(struct comedi_device *dev,
s->range_table = &range_digital;
s->insn_bits = das16m1_do_insn_bits;
/* Digital I/O subdevice (8255) */
s = &dev->subdevices[3];
/* 8255 */
ret = subdev_8255_init(dev, s, NULL, DAS16M1_82C55);
ret = subdev_8255_init(dev, s, NULL, DAS16M1_8255_IOBASE);
if (ret)
return ret;
......
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