Specifications
This is the Title of the Book, eMatter Edition
Copyright © 2005 O’Reilly & Associates, Inc. All rights reserved.
Quick Reference
|
463
int request_dma(unsigned int channel, const char *name);
void free_dma(unsigned int channel);
Access the DMA registry. Registration must be performed before using ISA DMA
channels.
unsigned long claim_dma_lock( );
void release_dma_lock(unsigned long flags);
Acquire and release the DMA spinlock, which must be held prior to calling the
other ISA DMA functions described later in this list. They also disable and reen-
able interrupts on the local processor.
void set_dma_mode(unsigned int channel, char mode);
void set_dma_addr(unsigned int channel, unsigned int addr);
void set_dma_count(unsigned int channel, unsigned int count);
Program DMA information in the DMA controller. addr is a bus address.
void disable_dma(unsigned int channel);
void enable_dma(unsigned int channel);
A DMA channel must be disabled during configuration. These functions change
the status of the DMA channel.
int get_dma_residue(unsigned int channel);
If the driver needs to know how a DMA transfer is proceeding, it can call this
function, which returns the number of data transfers that are yet to be com-
pleted. After successful completion of DMA, the function returns
0; the value is
unpredictable while data is being transferred.
void clear_dma_ff(unsigned int channel)
The DMA flip-flop is used by the controller to transfer 16-bit values by means of
two 8-bit operations. It must be cleared before sending any data to the controller.
,ch15.13676 Page 463 Friday, January 21, 2005 11:04 AM