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

staging: comedi: cb_pcidas: tidy up PCI BAR3 register defines

Rename the defines for the PCI BAR3 register offsets so they have
namespace associated with the driver and convert the offsets to
hex.
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 19aab073
...@@ -159,10 +159,12 @@ static inline unsigned int DAC_CHAN_EN(unsigned int channel) ...@@ -159,10 +159,12 @@ static inline unsigned int DAC_CHAN_EN(unsigned int channel)
#define ADCDATA 0 /* ADC DATA register */ #define ADCDATA 0 /* ADC DATA register */
#define ADCFIFOCLR 2 /* ADC FIFO CLEAR */ #define ADCFIFOCLR 2 /* ADC FIFO CLEAR */
/* pacer, counter, dio registers */ /*
#define ADC8254 0 * PCI BAR3 Register map (dev->iobase)
#define DIO_8255 4 */
#define DAC8254 8 #define PCIDAS_AI_8254_BASE 0x00
#define PCIDAS_8255_BASE 0x04
#define PCIDAS_AO_8254_BASE 0x08
/* /*
* PCI BAR4 Register map (devpriv->pcibar4) * PCI BAR4 Register map (devpriv->pcibar4)
...@@ -1353,12 +1355,12 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev, ...@@ -1353,12 +1355,12 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
} }
dev->irq = pcidev->irq; dev->irq = pcidev->irq;
dev->pacer = comedi_8254_init(dev->iobase + ADC8254, dev->pacer = comedi_8254_init(dev->iobase + PCIDAS_AI_8254_BASE,
I8254_OSC_BASE_10MHZ, I8254_IO8, 0); I8254_OSC_BASE_10MHZ, I8254_IO8, 0);
if (!dev->pacer) if (!dev->pacer)
return -ENOMEM; return -ENOMEM;
devpriv->ao_pacer = comedi_8254_init(dev->iobase + DAC8254, devpriv->ao_pacer = comedi_8254_init(dev->iobase + PCIDAS_AO_8254_BASE,
I8254_OSC_BASE_10MHZ, I8254_OSC_BASE_10MHZ,
I8254_IO8, 0); I8254_IO8, 0);
if (!devpriv->ao_pacer) if (!devpriv->ao_pacer)
...@@ -1415,7 +1417,7 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev, ...@@ -1415,7 +1417,7 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
/* 8255 */ /* 8255 */
s = &dev->subdevices[2]; s = &dev->subdevices[2];
ret = subdev_8255_init(dev, s, NULL, DIO_8255); ret = subdev_8255_init(dev, s, NULL, PCIDAS_8255_BASE);
if (ret) if (ret)
return 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