Clear gpct mite interrupts.
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 10 Jul 2007 18:22:09 +0000 (18:22 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 10 Jul 2007 18:22:09 +0000 (18:22 +0000)
comedi/drivers/ni_mio_common.c

index 7536bfc3b5ff8d7ea3076b7d3d3eef1c31213a83..63ec83fd09fe50bd62e785cf7b444e134df0626b 100644 (file)
@@ -785,6 +785,14 @@ static void handle_gpct_interrupt(comedi_device *dev, unsigned short counter_ind
                return;
        }
        gpct_mite_status = readl(mite_chan->mite->mite_io_addr + MITE_CHSR(mite_chan->channel));
+       if(gpct_mite_status & CHSR_LINKC)
+       {
+               writel(CHOR_CLRLC, devpriv->mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
+       }
+       if(gpct_mite_status & CHSR_DONE)
+       {
+               writel(CHOR_CLRDONE, devpriv->mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
+       }
        mite_sync_input_dma(mite_chan, s->async);
 
        comedi_spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);