Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363419
b: refs/heads/master
c: d99fc2c
h: refs/heads/master
i:
  363417: 5405923
  363415: dd1334f
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 11, 2013
1 parent 5bebfd9 commit 54c9baf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 47 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fff7a2cc99726f3994b9709782bd3e251ceb1023
refs/heads/master: d99fc2c3723e50c020bc1ca20107ecbf74d02e1f
51 changes: 5 additions & 46 deletions trunk/drivers/staging/comedi/drivers/adl_pci8164.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ Configuration Options: not applicable, uses PCI auto config
#include "comedi_fc.h"
#include "8253.h"

#define PCI8164_AXIS_X 0x00
#define PCI8164_AXIS_Y 0x08
#define PCI8164_AXIS_Z 0x10
#define PCI8164_AXIS_U 0x18
#define PCI8164_AXIS(x) ((x) * 0x08)

#define PCI8164_MSTS 0x00
#define PCI8164_SSTS 0x02
Expand All @@ -63,28 +60,9 @@ static void adl_pci8164_insn_read(struct comedi_device *dev,
unsigned int *data,
char *action, unsigned short offset)
{
int axis, axis_reg;

axis = CR_CHAN(insn->chanspec);

switch (axis) {
case 0:
axis_reg = PCI8164_AXIS_X;
break;
case 1:
axis_reg = PCI8164_AXIS_Y;
break;
case 2:
axis_reg = PCI8164_AXIS_Z;
break;
case 3:
axis_reg = PCI8164_AXIS_U;
break;
default:
axis_reg = PCI8164_AXIS_X;
}
unsigned int chan = CR_CHAN(insn->chanspec);

data[0] = inw(dev->iobase + axis_reg + offset);
data[0] = inw(dev->iobase + PCI8164_AXIS(chan) + offset);
}

static int adl_pci8164_insn_read_msts(struct comedi_device *dev,
Expand Down Expand Up @@ -133,28 +111,9 @@ static void adl_pci8164_insn_out(struct comedi_device *dev,
unsigned int *data,
char *action, unsigned short offset)
{
unsigned int axis, axis_reg;

axis = CR_CHAN(insn->chanspec);

switch (axis) {
case 0:
axis_reg = PCI8164_AXIS_X;
break;
case 1:
axis_reg = PCI8164_AXIS_Y;
break;
case 2:
axis_reg = PCI8164_AXIS_Z;
break;
case 3:
axis_reg = PCI8164_AXIS_U;
break;
default:
axis_reg = PCI8164_AXIS_X;
}
unsigned int chan = CR_CHAN(insn->chanspec);

outw(data[0], dev->iobase + axis_reg + offset);
outw(data[0], dev->iobase + PCI8164_AXIS(chan) + offset);
}

static int adl_pci8164_insn_write_cmd(struct comedi_device *dev,
Expand Down

0 comments on commit 54c9baf

Please sign in to comment.