Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317891
b: refs/heads/master
c: aa5372b
h: refs/heads/master
i:
  317889: f4b7188
  317887: 23f6b3d
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 13, 2012
1 parent 7785456 commit 43cea81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: 9b3f95cc39ed9ab637fee93ca86d42ca83d74099
refs/heads/master: aa5372b8879e5c0e49728db8ce1b1cafc545caf4
16 changes: 6 additions & 10 deletions trunk/drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,6 @@ struct rtdPrivate {

/* Macros to access registers */

/* Reset ADC FIFO */
#define RtdAdcClearFifo(dev) \
writel(0, devpriv->las0+LAS0_ADC_FIFO_CLEAR)

/* Set ADC start conversion source select (write only) */
#define RtdAdcConversionSource(dev, v) \
writel(v, devpriv->las0+LAS0_ADC_CONVERSION)
Expand Down Expand Up @@ -804,7 +800,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev)
static const unsigned limit = 0x2000;
unsigned fifo_size = 0;

RtdAdcClearFifo(dev);
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
rtd_load_channelgain_list(dev, 1, &chanspec);
RtdAdcConversionSource(dev, 0); /* software */
/* convert samples */
Expand All @@ -824,7 +820,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev)
DRV_NAME);
return -EIO;
}
RtdAdcClearFifo(dev);
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
if (fifo_size != 0x400 && fifo_size != 0x2000) {
printk
(KERN_INFO "\ncomedi: %s: unexpected fifo size of %i, expected 1024 or 8192.\n",
Expand All @@ -850,7 +846,7 @@ static int rtd_ai_rinsn(struct comedi_device *dev,
int stat;

/* clear any old fifo data */
RtdAdcClearFifo(dev);
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);

/* write channel to multiplexer and clear channel gain table */
rtd_load_channelgain_list(dev, 1, &insn->chanspec);
Expand Down Expand Up @@ -1204,7 +1200,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
return IRQ_HANDLED;

abortTransfer:
RtdAdcClearFifo(dev); /* clears full flag */
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
s->async->events |= COMEDI_CB_ERROR;
devpriv->aiCount = 0; /* stop and don't transfer any more */
/* fall into transferDone */
Expand Down Expand Up @@ -1495,7 +1491,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
}
RtdDma0Reset(dev); /* reset onboard state */
#endif /* USE_DMA */
RtdAdcClearFifo(dev); /* clear any old data */
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
RtdInterruptOverrunClear(dev);
devpriv->intCount = 0;

Expand Down Expand Up @@ -2036,7 +2032,7 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
RtdInterruptClear(dev); /* clears bits set by mask */
RtdInterruptOverrunClear(dev);
writel(0, devpriv->las0 + LAS0_CGT_CLEAR);
RtdAdcClearFifo(dev);
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
RtdDacClearFifo(dev, 0);
RtdDacClearFifo(dev, 1);
/* clear digital IO fifo */
Expand Down

0 comments on commit 43cea81

Please sign in to comment.