Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337244
b: refs/heads/master
c: 8727601
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent 147673f commit f500dfe
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 025d1f675c401da7c1efa0e37d5eada1abebdc5a
refs/heads/master: 87276012ead9f96f249fedf715b1052106f2e0d0
32 changes: 32 additions & 0 deletions trunk/drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,38 @@ static void dio200_write8(struct comedi_device *dev, unsigned int offset,
writeb(val, devpriv->io.u.membase + offset);
}

/*
* Read 32-bit register.
*/
static unsigned int dio200_read32(struct comedi_device *dev,
unsigned int offset)
{
const struct dio200_board *thisboard = comedi_board(dev);
struct dio200_private *devpriv = dev->private;

offset <<= thisboard->mainshift;
if (devpriv->io.regtype == io_regtype)
return inl(devpriv->io.u.iobase + offset);
else
return readl(devpriv->io.u.membase + offset);
}

/*
* Write 32-bit register.
*/
static void dio200_write32(struct comedi_device *dev, unsigned int offset,
unsigned int val)
{
const struct dio200_board *thisboard = comedi_board(dev);
struct dio200_private *devpriv = dev->private;

offset <<= thisboard->mainshift;
if (devpriv->io.regtype == io_regtype)
outl(val, devpriv->io.u.iobase + offset);
else
writel(val, devpriv->io.u.membase + offset);
}

/*
* This function looks for a board matching the supplied PCI device.
*/
Expand Down

0 comments on commit f500dfe

Please sign in to comment.