mite_chan->mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
}
-struct mite_struct *mite_alloc(struct pci_dev *pcidev)
+struct mite *mite_alloc(struct pci_dev *pcidev)
{
- struct mite_struct *mite;
+ struct mite *mite;
unsigned int i;
mite = kzalloc(sizeof(*mite), GFP_KERNEL);
CSIGR_TO_WINS(csigr_bits), CSIGR_TO_IOWINS(csigr_bits));
}
-static unsigned int mite_fifo_size(struct mite_struct *mite,
- unsigned int channel)
+static unsigned int mite_fifo_size(struct mite *mite, unsigned int channel)
{
unsigned int fcr_bits = readl(mite->mite_io_addr + MITE_FCR(channel));
unsigned int empty_count = (fcr_bits >> 16) & 0xff;
}
int mite_setup2(struct comedi_device *dev,
- struct mite_struct *mite, bool use_win1)
+ struct mite *mite, bool use_win1)
{
resource_size_t daq_phys_addr;
unsigned long length;
}
EXPORT_SYMBOL_GPL(mite_setup2);
-void mite_detach(struct mite_struct *mite)
+void mite_detach(struct mite *mite)
{
if (!mite)
return;
}
EXPORT_SYMBOL_GPL(mite_detach);
-struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite)
+struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite *mite)
{
struct mite_dma_descriptor_ring *ring =
kmalloc(sizeof(struct mite_dma_descriptor_ring), GFP_KERNEL);
EXPORT_SYMBOL_GPL(mite_free_ring);
struct mite_channel *
-mite_request_channel_in_range(struct mite_struct *mite,
+mite_request_channel_in_range(struct mite *mite,
struct mite_dma_descriptor_ring *ring,
unsigned int min_channel,
unsigned int max_channel)
void mite_release_channel(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
unsigned long flags;
/* spin lock to prevent races with mite_request_channel */
void mite_dma_arm(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
int chor;
unsigned long flags;
void mite_prep_dma(struct mite_channel *mite_chan,
unsigned int num_device_bits, unsigned int num_memory_bits)
{
+ struct mite *mite = mite_chan->mite;
unsigned int chcr, mcr, dcr, lkcr;
- struct mite_struct *mite = mite_chan->mite;
mite_dma_reset(mite_chan);
static u32 mite_device_bytes_transferred(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
return readl(mite->mite_io_addr + MITE_DAR(mite_chan->channel));
}
u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
return readl(mite->mite_io_addr +
MITE_FCR(mite_chan->channel)) & 0x000000FF;
void mite_dma_disarm(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
unsigned int chor;
/* disarm */
static unsigned int mite_get_status(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
unsigned int status;
unsigned long flags;
struct comedi_subdevice *s,
bool sync)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
unsigned int status;
status = mite_get_status(mite_chan);
int mite_done(struct mite_channel *mite_chan)
{
- struct mite_struct *mite = mite_chan->mite;
+ struct mite *mite = mite_chan->mite;
unsigned long flags;
int done;
};
struct mite_channel {
- struct mite_struct *mite;
+ struct mite *mite;
unsigned int channel;
int dir;
int done;
struct mite_dma_descriptor_ring *ring;
};
-struct mite_struct {
+struct mite {
struct pci_dev *pcidev;
void __iomem *mite_io_addr;
struct mite_channel channels[MAX_MITE_DMA_CHANNELS];
spinlock_t lock;
};
-struct mite_struct *mite_alloc(struct pci_dev *pcidev);
+struct mite *mite_alloc(struct pci_dev *);
-int mite_setup2(struct comedi_device *, struct mite_struct *, bool use_win1);
+int mite_setup2(struct comedi_device *, struct mite *, bool use_win1);
static inline int mite_setup(struct comedi_device *dev,
- struct mite_struct *mite)
+ struct mite *mite)
{
return mite_setup2(dev, mite, false);
}
-void mite_detach(struct mite_struct *mite);
-struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite);
+void mite_detach(struct mite *);
+struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite *);
void mite_free_ring(struct mite_dma_descriptor_ring *ring);
struct mite_channel *
-mite_request_channel_in_range(struct mite_struct *mite,
+mite_request_channel_in_range(struct mite *,
struct mite_dma_descriptor_ring *ring,
unsigned int min_channel,
unsigned int max_channel);
static inline struct mite_channel *
-mite_request_channel(struct mite_struct *mite,
+mite_request_channel(struct mite *mite,
struct mite_dma_descriptor_ring *ring)
{
return mite_request_channel_in_range(mite, ring, 0,