Lines Matching refs:dmanr

173 static __inline__ void enable_dma(unsigned int dmanr)  in enable_dma()  argument
175 if (dmanr<=3) in enable_dma()
176 dma_outb(dmanr, DMA1_MASK_REG); in enable_dma()
178 dma_outb(dmanr & 3, DMA2_MASK_REG); in enable_dma()
181 static __inline__ void disable_dma(unsigned int dmanr) in disable_dma() argument
183 if (dmanr<=3) in disable_dma()
184 dma_outb(dmanr | 4, DMA1_MASK_REG); in disable_dma()
186 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG); in disable_dma()
196 static __inline__ void clear_dma_ff(unsigned int dmanr) in clear_dma_ff() argument
198 if (dmanr<=3) in clear_dma_ff()
205 static __inline__ void set_dma_mode(unsigned int dmanr, char mode) in set_dma_mode() argument
207 if (dmanr<=3) in set_dma_mode()
208 dma_outb(mode | dmanr, DMA1_MODE_REG); in set_dma_mode()
210 dma_outb(mode | (dmanr&3), DMA2_MODE_REG); in set_dma_mode()
218 static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) in set_dma_page() argument
220 switch(dmanr) { in set_dma_page()
249 static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) in set_dma_addr() argument
251 set_dma_page(dmanr, a>>16); in set_dma_addr()
252 if (dmanr <= 3) { in set_dma_addr()
253 dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); in set_dma_addr()
254 dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); in set_dma_addr()
256 dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); in set_dma_addr()
257 dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); in set_dma_addr()
270 static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) in set_dma_count() argument
273 if (dmanr <= 3) { in set_dma_count()
274 dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); in set_dma_count()
275 dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); in set_dma_count()
277 dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); in set_dma_count()
278 dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); in set_dma_count()
291 static __inline__ int get_dma_residue(unsigned int dmanr) in get_dma_residue() argument
293 unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE in get_dma_residue()
294 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE; in get_dma_residue()
302 return (dmanr<=3)? count : (count<<1); in get_dma_residue()
307 extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
308 extern void free_dma(unsigned int dmanr); /* release it again */