tag | line | file | source code |
dmanr | 126 | include/asm/dma.h | static __inline__ void enable_dma(unsigned int dmanr) |
dmanr | 128 | include/asm/dma.h | if (dmanr<=3) |
dmanr | 129 | include/asm/dma.h | outb(dmanr, DMA1_MASK_REG); |
dmanr | 131 | include/asm/dma.h | outb(dmanr & 3, DMA2_MASK_REG); |
dmanr | 134 | include/asm/dma.h | static __inline__ void disable_dma(unsigned int dmanr) |
dmanr | 136 | include/asm/dma.h | if (dmanr<=3) |
dmanr | 137 | include/asm/dma.h | outb(dmanr | 4, DMA1_MASK_REG); |
dmanr | 139 | include/asm/dma.h | outb((dmanr & 3) | 4, DMA2_MASK_REG); |
dmanr | 149 | include/asm/dma.h | static __inline__ void clear_dma_ff(unsigned int dmanr) |
dmanr | 151 | include/asm/dma.h | if (dmanr<=3) |
dmanr | 158 | include/asm/dma.h | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) |
dmanr | 160 | include/asm/dma.h | if (dmanr<=3) |
dmanr | 161 | include/asm/dma.h | outb(mode | dmanr, DMA1_MODE_REG); |
dmanr | 163 | include/asm/dma.h | outb(mode | (dmanr&3), DMA2_MODE_REG); |
dmanr | 171 | include/asm/dma.h | static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) |
dmanr | 173 | include/asm/dma.h | switch(dmanr) { |
dmanr | 202 | include/asm/dma.h | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) |
dmanr | 204 | include/asm/dma.h | set_dma_page(dmanr, a>>16); |
dmanr | 205 | include/asm/dma.h | if (dmanr <= 3) { |
dmanr | 206 | include/asm/dma.h | outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); |
dmanr | 207 | include/asm/dma.h | outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); |
dmanr | 209 | include/asm/dma.h | outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); |
dmanr | 210 | include/asm/dma.h | outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); |
dmanr | 223 | include/asm/dma.h | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) |
dmanr | 226 | include/asm/dma.h | if (dmanr <= 3) { |
dmanr | 227 | include/asm/dma.h | outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); |
dmanr | 228 | include/asm/dma.h | outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); |
dmanr | 230 | include/asm/dma.h | outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); |
dmanr | 231 | include/asm/dma.h | outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); |
dmanr | 244 | include/asm/dma.h | static __inline__ int get_dma_residue(unsigned int dmanr) |
dmanr | 246 | include/asm/dma.h | unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE |
dmanr | 247 | include/asm/dma.h | : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE; |
dmanr | 255 | include/asm/dma.h | return (dmanr<=3)? count : (count<<1); |
dmanr | 260 | include/asm/dma.h | extern int request_dma(unsigned int dmanr); /* reserve a DMA channel */ |
dmanr | 261 | include/asm/dma.h | extern void free_dma(unsigned int dmanr); /* release it again */ |
dmanr | 64 | kernel/dma.c | int request_dma(unsigned int dmanr) |
dmanr | 66 | kernel/dma.c | if (dmanr >= MAX_DMA_CHANNELS) |
dmanr | 69 | kernel/dma.c | if (mutex_atomic_swap(&dma_chan_busy[dmanr], 1) != 0) |
dmanr | 77 | kernel/dma.c | void free_dma(unsigned int dmanr) |
dmanr | 79 | kernel/dma.c | if (dmanr >= MAX_DMA_CHANNELS) { |
dmanr | 80 | kernel/dma.c | printk("Trying to free DMA%d\n", dmanr); |
dmanr | 84 | kernel/dma.c | if (mutex_atomic_swap(&dma_chan_busy[dmanr], 0) == 0) |
dmanr | 85 | kernel/dma.c | printk("Trying to free free DMA%d\n", dmanr); |