#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/log2.h>
#include <linux/comedi/comedi_pci.h>
#include "mite.h"
#define MITE_UNKNOWN_DMA_BURST_REG …
#define UNKNOWN_DMA_BURST_ENABLE_BITS …
#define MITE_PCI_CONFIG_OFFSET …
#define MITE_CSIGR …
#define CSIGR_TO_IOWINS(x) …
#define CSIGR_TO_WINS(x) …
#define CSIGR_TO_WPDEP(x) …
#define CSIGR_TO_DMAC(x) …
#define CSIGR_TO_IMODE(x) …
#define CSIGR_TO_MMODE(x) …
#define CSIGR_TO_TYPE(x) …
#define CSIGR_TO_VER(x) …
#define MITE_CHAN(x) …
#define MITE_CHOR(x) …
#define CHOR_DMARESET …
#define CHOR_SET_SEND_TC …
#define CHOR_CLR_SEND_TC …
#define CHOR_SET_LPAUSE …
#define CHOR_CLR_LPAUSE …
#define CHOR_CLRDONE …
#define CHOR_CLRRB …
#define CHOR_CLRLC …
#define CHOR_FRESET …
#define CHOR_ABORT …
#define CHOR_STOP …
#define CHOR_CONT …
#define CHOR_START …
#define MITE_CHCR(x) …
#define CHCR_SET_DMA_IE …
#define CHCR_CLR_DMA_IE …
#define CHCR_SET_LINKP_IE …
#define CHCR_CLR_LINKP_IE …
#define CHCR_SET_SAR_IE …
#define CHCR_CLR_SAR_IE …
#define CHCR_SET_DONE_IE …
#define CHCR_CLR_DONE_IE …
#define CHCR_SET_MRDY_IE …
#define CHCR_CLR_MRDY_IE …
#define CHCR_SET_DRDY_IE …
#define CHCR_CLR_DRDY_IE …
#define CHCR_SET_LC_IE …
#define CHCR_CLR_LC_IE …
#define CHCR_SET_CONT_RB_IE …
#define CHCR_CLR_CONT_RB_IE …
#define CHCR_FIFO(x) …
#define CHCR_FIFODIS …
#define CHCR_FIFO_ON …
#define CHCR_BURST(x) …
#define CHCR_BURSTEN …
#define CHCR_NO_BURSTEN …
#define CHCR_BYTE_SWAP_DEVICE …
#define CHCR_BYTE_SWAP_MEMORY …
#define CHCR_DIR(x) …
#define CHCR_DEV_TO_MEM …
#define CHCR_MEM_TO_DEV …
#define CHCR_MODE(x) …
#define CHCR_NORMAL …
#define CHCR_CONTINUE …
#define CHCR_RINGBUFF …
#define CHCR_LINKSHORT …
#define CHCR_LINKLONG …
#define MITE_TCR(x) …
#define MITE_MCR(x) …
#define MITE_MAR(x) …
#define MITE_DCR(x) …
#define DCR_NORMAL …
#define MITE_DAR(x) …
#define MITE_LKCR(x) …
#define MITE_LKAR(x) …
#define MITE_LLKAR(x) …
#define MITE_BAR(x) …
#define MITE_BCR(x) …
#define MITE_SAR(x) …
#define MITE_WSCR(x) …
#define MITE_WSER(x) …
#define MITE_CHSR(x) …
#define CHSR_INT …
#define CHSR_LPAUSES …
#define CHSR_SARS …
#define CHSR_DONE …
#define CHSR_MRDY …
#define CHSR_DRDY …
#define CHSR_LINKC …
#define CHSR_CONTS_RB …
#define CHSR_ERROR …
#define CHSR_SABORT …
#define CHSR_HABORT …
#define CHSR_STOPS …
#define CHSR_OPERR(x) …
#define CHSR_OPERR_MASK …
#define CHSR_OPERR_NOERROR …
#define CHSR_OPERR_FIFOERROR …
#define CHSR_OPERR_LINKERROR …
#define CHSR_XFERR …
#define CHSR_END …
#define CHSR_DRQ1 …
#define CHSR_DRQ0 …
#define CHSR_LERR(x) …
#define CHSR_LERR_MASK …
#define CHSR_LBERR …
#define CHSR_LRERR …
#define CHSR_LOERR …
#define CHSR_MERR(x) …
#define CHSR_MERR_MASK …
#define CHSR_MBERR …
#define CHSR_MRERR …
#define CHSR_MOERR …
#define CHSR_DERR(x) …
#define CHSR_DERR_MASK …
#define CHSR_DBERR …
#define CHSR_DRERR …
#define CHSR_DOERR …
#define MITE_FCR(x) …
#define CR_RL(x) …
#define CR_REQS(x) …
#define CR_REQS_MASK …
#define CR_ASEQ(x) …
#define CR_ASEQDONT …
#define CR_ASEQUP …
#define CR_ASEQDOWN …
#define CR_ASEQ_MASK …
#define CR_PSIZE(x) …
#define CR_PSIZE8 …
#define CR_PSIZE16 …
#define CR_PSIZE32 …
#define CR_PORT(x) …
#define CR_PORTCPU …
#define CR_PORTIO …
#define CR_PORTVXI …
#define CR_PORTMXI …
#define CR_AMDEVICE …
static unsigned int MITE_IODWBSR_1_WSIZE_bits(unsigned int size)
{ … }
static unsigned int mite_retry_limit(unsigned int retry_limit)
{ … }
static unsigned int mite_drq_reqs(unsigned int drq_line)
{ … }
static unsigned int mite_fifo_size(struct mite *mite, unsigned int channel)
{ … }
static u32 mite_device_bytes_transferred(struct mite_channel *mite_chan)
{ … }
u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
{ … }
EXPORT_SYMBOL_GPL(…);
static u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan)
{ … }
static u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan)
{ … }
static u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan)
{ … }
static u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan)
{ … }
static void mite_sync_input_dma(struct mite_channel *mite_chan,
struct comedi_subdevice *s)
{ … }
static void mite_sync_output_dma(struct mite_channel *mite_chan,
struct comedi_subdevice *s)
{ … }
void mite_sync_dma(struct mite_channel *mite_chan, struct comedi_subdevice *s)
{ … }
EXPORT_SYMBOL_GPL(…);
static unsigned int mite_get_status(struct mite_channel *mite_chan)
{ … }
void mite_ack_linkc(struct mite_channel *mite_chan,
struct comedi_subdevice *s,
bool sync)
{ … }
EXPORT_SYMBOL_GPL(…);
int mite_done(struct mite_channel *mite_chan)
{ … }
EXPORT_SYMBOL_GPL(…);
static void mite_dma_reset(struct mite_channel *mite_chan)
{ … }
void mite_dma_arm(struct mite_channel *mite_chan)
{ … }
EXPORT_SYMBOL_GPL(…);
void mite_dma_disarm(struct mite_channel *mite_chan)
{ … }
EXPORT_SYMBOL_GPL(…);
void mite_prep_dma(struct mite_channel *mite_chan,
unsigned int num_device_bits, unsigned int num_memory_bits)
{ … }
EXPORT_SYMBOL_GPL(…);
struct mite_channel *mite_request_channel_in_range(struct mite *mite,
struct mite_ring *ring,
unsigned int min_channel,
unsigned int max_channel)
{ … }
EXPORT_SYMBOL_GPL(…);
struct mite_channel *mite_request_channel(struct mite *mite,
struct mite_ring *ring)
{ … }
EXPORT_SYMBOL_GPL(…);
void mite_release_channel(struct mite_channel *mite_chan)
{ … }
EXPORT_SYMBOL_GPL(…);
int mite_init_ring_descriptors(struct mite_ring *ring,
struct comedi_subdevice *s,
unsigned int nbytes)
{ … }
EXPORT_SYMBOL_GPL(…);
static void mite_free_dma_descs(struct mite_ring *ring)
{ … }
int mite_buf_change(struct mite_ring *ring, struct comedi_subdevice *s)
{ … }
EXPORT_SYMBOL_GPL(…);
struct mite_ring *mite_alloc_ring(struct mite *mite)
{ … }
EXPORT_SYMBOL_GPL(…);
void mite_free_ring(struct mite_ring *ring)
{ … }
EXPORT_SYMBOL_GPL(…);
static int mite_setup(struct comedi_device *dev, struct mite *mite,
bool use_win1)
{ … }
struct mite *mite_attach(struct comedi_device *dev, bool use_win1)
{ … }
EXPORT_SYMBOL_GPL(…);
void mite_detach(struct mite *mite)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init mite_module_init(void)
{ … }
module_init(…) …;
static void __exit mite_module_exit(void)
{ … }
module_exit(mite_module_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;