• Home
  • Raw
  • Download

Lines Matching refs:dmanr

182 static __inline__ void enable_dma(unsigned int dmanr)  in enable_dma()  argument
186 if (dmanr != 4) { in enable_dma()
190 if (dmanr <= 3) { in enable_dma()
191 dma_outb(dmanr, DMA1_MASK_REG); in enable_dma()
194 dma_outb(dmanr & 3, DMA2_MASK_REG); in enable_dma()
198 static __inline__ void disable_dma(unsigned int dmanr) in disable_dma() argument
200 if (dmanr <= 3) in disable_dma()
201 dma_outb(dmanr | 4, DMA1_MASK_REG); in disable_dma()
203 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG); in disable_dma()
213 static __inline__ void clear_dma_ff(unsigned int dmanr) in clear_dma_ff() argument
215 if (dmanr <= 3) in clear_dma_ff()
222 static __inline__ void set_dma_mode(unsigned int dmanr, char mode) in set_dma_mode() argument
224 if (dmanr <= 3) in set_dma_mode()
225 dma_outb(mode | dmanr, DMA1_MODE_REG); in set_dma_mode()
227 dma_outb(mode | (dmanr & 3), DMA2_MODE_REG); in set_dma_mode()
235 static __inline__ void set_dma_page(unsigned int dmanr, int pagenr) in set_dma_page() argument
237 switch (dmanr) { in set_dma_page()
272 static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int phys) in set_dma_addr() argument
274 if (dmanr <= 3) { in set_dma_addr()
276 ((dmanr & 3) << 1) + IO_DMA1_BASE); in set_dma_addr()
278 ((dmanr & 3) << 1) + IO_DMA1_BASE); in set_dma_addr()
281 ((dmanr & 3) << 2) + IO_DMA2_BASE); in set_dma_addr()
283 ((dmanr & 3) << 2) + IO_DMA2_BASE); in set_dma_addr()
285 set_dma_page(dmanr, phys >> 16); in set_dma_addr()
297 static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) in set_dma_count() argument
300 if (dmanr <= 3) { in set_dma_count()
302 ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); in set_dma_count()
304 ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); in set_dma_count()
307 ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); in set_dma_count()
309 ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); in set_dma_count()
322 static __inline__ int get_dma_residue(unsigned int dmanr) in get_dma_residue() argument
324 unsigned int io_port = (dmanr <= 3) in get_dma_residue()
325 ? ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE in get_dma_residue()
326 : ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE; in get_dma_residue()
334 return (dmanr <= 3) ? count : (count << 1); in get_dma_residue()
340 extern int request_dma(unsigned int dmanr, const char *device_id);
342 extern void free_dma(unsigned int dmanr);