From: Ian Abbott Date: Mon, 28 May 2012 09:40:42 +0000 (+0100) Subject: amplc_dio200: Add 32-bit register access functions. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a4b5809cca80cac5b242256024002323c6c8c22;p=comedi.git amplc_dio200: Add 32-bit register access functions. These will be used to support extra features of the PCIe boards. Signed-off-by: Ian Abbott --- diff --git a/comedi/drivers/amplc_dio200.c b/comedi/drivers/amplc_dio200.c index 27c1375d..1b9c6607 100644 --- a/comedi/drivers/amplc_dio200.c +++ b/comedi/drivers/amplc_dio200.c @@ -681,6 +681,35 @@ static void dio200_write8(comedi_device * dev, unsigned int offset, writeb(val, devpriv->io.u.membase + offset); } +/* + * Read 32-bit register. + */ +#ifdef CONFIG_COMEDI_PCI +static unsigned int dio200_read32(comedi_device * dev, unsigned int offset) +{ + offset <<= devpriv->io.regshift; + if (devpriv->io.regtype == io_regtype) + return inl(devpriv->io.u.iobase + offset); + else + return readl(devpriv->io.u.membase + offset); +} +#endif + +/* + * Write 32-bit register. + */ +#ifdef CONFIG_COMEDI_PCI +static void dio200_write32(comedi_device * dev, unsigned int offset, + unsigned int val) +{ + offset <<= devpriv->io.regshift; + if (devpriv->io.regtype == io_regtype) + outl(val, devpriv->io.u.iobase + offset); + else + writel(val, devpriv->io.u.membase + offset); +} +#endif + /* * This function looks for a PCI device matching the requested board name, * bus and slot.