Lines Matching refs:dmanr

167 static inline void enable_dma(unsigned int dmanr)  in enable_dma()  argument
169 if (dmanr <= 3) in enable_dma()
170 dma_outb(dmanr, DMA1_MASK_REG); in enable_dma()
172 dma_outb(dmanr & 3, DMA2_MASK_REG); in enable_dma()
175 static inline void disable_dma(unsigned int dmanr) in disable_dma() argument
177 if (dmanr <= 3) in disable_dma()
178 dma_outb(dmanr | 4, DMA1_MASK_REG); in disable_dma()
180 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG); in disable_dma()
190 static inline void clear_dma_ff(unsigned int dmanr) in clear_dma_ff() argument
192 if (dmanr <= 3) in clear_dma_ff()
199 static inline void set_dma_mode(unsigned int dmanr, char mode) in set_dma_mode() argument
201 if (dmanr <= 3) in set_dma_mode()
202 dma_outb(mode | dmanr, DMA1_MODE_REG); in set_dma_mode()
204 dma_outb(mode | (dmanr & 3), DMA2_MODE_REG); in set_dma_mode()
212 static inline void set_dma_page(unsigned int dmanr, char pagenr) in set_dma_page() argument
214 switch (dmanr) { in set_dma_page()
243 static inline void set_dma_addr(unsigned int dmanr, unsigned int a) in set_dma_addr() argument
245 set_dma_page(dmanr, a>>16); in set_dma_addr()
246 if (dmanr <= 3) { in set_dma_addr()
247 dma_outb(a & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE); in set_dma_addr()
248 dma_outb((a >> 8) & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE); in set_dma_addr()
250 dma_outb((a >> 1) & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE); in set_dma_addr()
251 dma_outb((a >> 9) & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE); in set_dma_addr()
264 static inline void set_dma_count(unsigned int dmanr, unsigned int count) in set_dma_count() argument
267 if (dmanr <= 3) { in set_dma_count()
268 dma_outb(count & 0xff, ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); in set_dma_count()
270 ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); in set_dma_count()
273 ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); in set_dma_count()
275 ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); in set_dma_count()
288 static inline int get_dma_residue(unsigned int dmanr) in get_dma_residue() argument
294 io_port = (dmanr <= 3) ? ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE in get_dma_residue()
295 : ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE; in get_dma_residue()
300 return (dmanr <= 3) ? count : (count << 1); in get_dma_residue()
306 extern int request_dma(unsigned int dmanr, const char *device_id);
307 extern void free_dma(unsigned int dmanr);