return readl(mite->mmio + MITE_DAR(mite_chan->channel));
}
+/**
+ * mite_bytes_in_transit() - Returns the number of unread bytes in the fifo.
+ * @mite_chan: MITE dma channel.
+ */
u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
{
struct mite *mite = mite_chan->mite;
}
}
+/**
+ * mite_sync_dma() - Sync the MITE dma with the COMEDI async buffer.
+ * @mite_chan: MITE dma channel.
+ * @s: COMEDI subdevice.
+ */
void mite_sync_dma(struct mite_channel *mite_chan, struct comedi_subdevice *s)
{
if (mite_chan->dir == COMEDI_INPUT)
return status;
}
+/**
+ * mite_ack_linkc() - Check and ack the LINKC interrupt,
+ * @mite_chan: MITE dma channel.
+ * @s: COMEDI subdevice.
+ * @sync: flag to force a mite_sync_dma().
+ *
+ * This will also ack the DONE interrupt if active.
+ */
void mite_ack_linkc(struct mite_channel *mite_chan,
struct comedi_subdevice *s,
bool sync)
}
EXPORT_SYMBOL_GPL(mite_ack_linkc);
+/**
+ * mite_done() - Check is a MITE dma transfer is complete.
+ * @mite_chan: MITE dma channel.
+ *
+ * This will also ack the DONE interrupt if active.
+ */
int mite_done(struct mite_channel *mite_chan)
{
struct mite *mite = mite_chan->mite;
spinlock_t lock;
};
-void mite_sync_dma(struct mite_channel *mite_chan, struct comedi_subdevice *s);
-u32 mite_bytes_in_transit(struct mite_channel *mite_chan);
-void mite_ack_linkc(struct mite_channel *, struct comedi_subdevice *,
+u32 mite_bytes_in_transit(struct mite_channel *);
+
+void mite_sync_dma(struct mite_channel *, struct comedi_subdevice *);
+void mite_ack_linkc(struct mite_channel *, struct comedi_subdevice *s,
bool sync);
-int mite_done(struct mite_channel *mite_chan);
+int mite_done(struct mite_channel *);
void mite_dma_arm(struct mite_channel *);
void mite_dma_disarm(struct mite_channel *);