/linux-2.4.37.9/arch/arm/mach-sa1100/ |
D | dma-sa1100.c | 32 #define DPRINTK( s, arg... ) printk( "dma<%s>: " s, dma->device_id , ##arg ) 67 static inline int start_sa1100_dma(sa1100_dma_t * dma, dma_addr_t dma_ptr, int size) in start_sa1100_dma() argument 69 dma_regs_t *regs = dma->regs; in start_sa1100_dma() 108 static int start_dma(sa1100_dma_t *dma, dma_addr_t dma_ptr, int size) in start_dma() argument 110 if (channel_is_sa1111_sac(dma - dma_chan)) in start_dma() 111 return start_sa1111_sac_dma(dma, dma_ptr, size); in start_dma() 112 return start_sa1100_dma(dma, dma_ptr, size); in start_dma() 117 static void process_dma(sa1100_dma_t * dma) in process_dma() argument 123 buf = dma->tail; in process_dma() 125 if (!buf || dma->stopped) { in process_dma() [all …]
|
D | dma-sa1111.c | 29 #define DPRINTK( s, arg... ) printk( "dma<%s>: " s, dma->device_id , ##arg ) 52 sa1100_dma_t *dma = &dma_chan[channel]; in sa1111_reset_sac_dma() local 53 dma->regs->SAD_CS = 0; in sa1111_reset_sac_dma() 55 dma->dma_a = dma->dma_b = 0; in sa1111_reset_sac_dma() 59 int start_sa1111_sac_dma(sa1100_dma_t *dma, dma_addr_t dma_ptr, size_t size) in start_sa1111_sac_dma() argument 61 dma_regs_t *sac_regs = dma->regs; in start_sa1111_sac_dma() 73 if( dma->dma_a && dma->dma_b ){ in start_sa1111_sac_dma() 75 dma->dma_a, dma->dma_b); in start_sa1111_sac_dma() 83 if( (dma->last_dma || dma->dma_b) && dma->dma_a == 0 ){ in start_sa1111_sac_dma() 91 ++dma->dma_a; in start_sa1111_sac_dma() [all …]
|
/linux-2.4.37.9/arch/arm/kernel/ |
D | dma.c | 36 dma_t *dma; in get_dma_list() local 40 for (i = 0, dma = dma_chan; i < MAX_DMA_CHANNELS; i++, dma++) in get_dma_list() 41 if (dma->lock) in get_dma_list() 43 dma->d_ops->type, dma->device_id); in get_dma_list() 55 dma_t *dma = dma_chan + channel; in request_dma() local 58 if (channel >= MAX_DMA_CHANNELS || !dma->d_ops) in request_dma() 61 if (xchg(&dma->lock, 1) != 0) in request_dma() 64 dma->device_id = device_id; in request_dma() 65 dma->active = 0; in request_dma() 66 dma->invalid = 1; in request_dma() [all …]
|
D | dma-rpc.c | 55 static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma) in iomd_get_next_sg() argument 59 if (dma->sg) { in iomd_get_next_sg() 60 sg->dma_address = dma->sg->dma_address; in iomd_get_next_sg() 63 end = offset + dma->sg->length; in iomd_get_next_sg() 73 dma->sg->length -= end - offset; in iomd_get_next_sg() 74 dma->sg->dma_address += end - offset; in iomd_get_next_sg() 76 if (dma->sg->length == 0) { in iomd_get_next_sg() 77 if (dma->sgcount > 1) { in iomd_get_next_sg() 78 dma->sg++; in iomd_get_next_sg() 79 dma->sgcount--; in iomd_get_next_sg() [all …]
|
D | dma-arc.c | 28 static void arc_floppy_data_enable_dma(dmach_t channel, dma_t *dma) in arc_floppy_data_enable_dma() argument 31 switch (dma->dma_mode) { in arc_floppy_data_enable_dma() 42 fdc1772_setupdma(dma->buf.length, dma->buf.address); /* Sets data pointer up */ in arc_floppy_data_enable_dma() 57 fdc1772_setupdma(dma->buf.length, dma->buf.address); /* Sets data pointer up */ in arc_floppy_data_enable_dma() 68 static int arc_floppy_data_get_dma_residue(dmach_t channel, dma_t *dma) in arc_floppy_data_get_dma_residue() argument 76 static void arc_floppy_cmdend_enable_dma(dmach_t channel, dma_t *dma) in arc_floppy_cmdend_enable_dma() argument 94 static int arc_floppy_cmdend_get_dma_residue(dmach_t channel, dma_t *dma) in arc_floppy_cmdend_get_dma_residue() argument 103 static void arc_disable_dma(dmach_t channel, dma_t *dma) in arc_disable_dma() argument 105 disable_fiq(dma->dma_irq); in arc_disable_dma() 128 static int a5k_floppy_get_dma_residue(dmach_t channel, dma_t *dma) in a5k_floppy_get_dma_residue() argument [all …]
|
D | dma-riscstation.c | 36 static void floppy_enable_dma(dmach_t channel, dma_t *dma) in floppy_enable_dma() argument 42 if (dma->dma_mode == DMA_MODE_READ) { in floppy_enable_dma() 52 regs.ARM_r9 = dma->buf.length; in floppy_enable_dma() 53 regs.ARM_r10 = (unsigned long)dma->buf.address; in floppy_enable_dma() 63 enable_fiq(dma->dma_irq); in floppy_enable_dma() 66 static void floppy_disable_dma(dmach_t channel, dma_t *dma) in floppy_disable_dma() argument 68 disable_fiq(dma->dma_irq); in floppy_disable_dma() 72 static int floppy_get_residue(dmach_t channel, dma_t *dma) in floppy_get_residue() argument 89 static void sound_enable_disable_dma(dmach_t channel, dma_t *dma) in sound_enable_disable_dma() argument 99 void __init arch_dma_init(dma_t *dma) in arch_dma_init() argument [all …]
|
D | dma-isa.c | 54 static int isa_get_dma_residue(dmach_t channel, dma_t *dma) in isa_get_dma_residue() argument 65 static void isa_enable_dma(dmach_t channel, dma_t *dma) in isa_enable_dma() argument 67 if (dma->invalid) { in isa_enable_dma() 72 switch (dma->dma_mode & DMA_MODE_MASK) { in isa_enable_dma() 92 if (!dma->using_sg) { in isa_enable_dma() 97 dma->buf.dma_address = pci_map_single(NULL, in isa_enable_dma() 98 dma->buf.address, dma->buf.length, in isa_enable_dma() 102 address = dma->buf.dma_address; in isa_enable_dma() 103 length = dma->buf.length - 1; in isa_enable_dma() 121 if (dma->dma_mode & DMA_AUTOINIT) in isa_enable_dma() [all …]
|
/linux-2.4.37.9/drivers/ieee1394/ |
D | dma.c | 59 void dma_region_init(struct dma_region *dma) in dma_region_init() argument 61 dma->kvirt = NULL; in dma_region_init() 62 dma->dev = NULL; in dma_region_init() 63 dma->n_pages = 0; in dma_region_init() 64 dma->n_dma_pages = 0; in dma_region_init() 65 dma->sglist = NULL; in dma_region_init() 68 int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes, struct pci_dev *dev, int direct… in dma_region_alloc() argument 77 dma->kvirt = vmalloc_32(n_pages * PAGE_SIZE); in dma_region_alloc() 78 if (!dma->kvirt) { in dma_region_alloc() 83 dma->n_pages = n_pages; in dma_region_alloc() [all …]
|
/linux-2.4.37.9/drivers/net/hamradio/soundmodem/ |
D | smdma.h | 61 set_dma_addr(dmanr, virt_to_bus(sm->dma.obuf)); in dma_setup() 62 set_dma_count(dmanr, sm->dma.ofragsz * NUM_FRAGMENTS); in dma_setup() 64 if (sm->dma.o16bit) in dma_setup() 65 return sm->dma.ofragsz/2; in dma_setup() 66 return sm->dma.ofragsz; in dma_setup() 71 set_dma_addr(dmanr, virt_to_bus(sm->dma.ibuf)); in dma_setup() 72 set_dma_count(dmanr, sm->dma.ifragsz * NUM_FRAGMENTS); in dma_setup() 74 if (sm->dma.i16bit) in dma_setup() 75 return sm->dma.ifragsz/2; in dma_setup() 76 return sm->dma.ifragsz; in dma_setup() [all …]
|
D | sm_wss.c | 197 if ((tmp & 0x80) && ((dev->dma == 0) || in wss_init_codec() 209 if (dev->dma > 3 || dmatab[dev->dma] == -1) { in wss_init_codec() 211 sm_drvname, (int)dev->dma); in wss_init_codec() 214 tmp = irqtab[dev->irq] | dmatab[dev->dma]; in wss_init_codec() 336 dma_setup(sm, oldcodecmode & 1, dev->dma); in setup_dma_wss() 347 numsamps = dma_setup(sm, send, dev->dma) - 1; in setup_dma_wss() 368 disable_dma(dev->dma); in wss_interrupt() 369 clear_dma_ff(dev->dma); in wss_interrupt() 370 nums = dma_ptr(sm, sm->dma.ptt_cnt > 0, dev->dma, &curfrag) - 1; in wss_interrupt() 373 enable_dma(dev->dma); in wss_interrupt() [all …]
|
D | sm_sbc.c | 186 switch (dev->dma) { in config_resources() 276 nsamps = dma_setup(sm, send, dev->dma) - 1; in setup_dma_dsp() 305 disable_dma(dev->dma); in sbc_interrupt() 306 clear_dma_ff(dev->dma); in sbc_interrupt() 307 dma_ptr(sm, sm->dma.ptt_cnt > 0, dev->dma, &curfrag); in sbc_interrupt() 308 enable_dma(dev->dma); in sbc_interrupt() 311 if (sm->dma.ptt_cnt <= 0) { in sbc_interrupt() 316 disable_dma(dev->dma); in sbc_interrupt() 324 disable_dma(dev->dma); in sbc_interrupt() 351 dev->irq < 2 || dev->irq > 15 || dev->dma > 3) in sbc_open() [all …]
|
/linux-2.4.37.9/drivers/sbus/ |
D | dvma.c | 28 void __init init_one_dvma(struct sbus_dma *dma, int num_dma) in init_one_dvma() argument 32 dma->next = 0; in init_one_dvma() 33 dma->running = 0; /* No transfers going on as of yet */ in init_one_dvma() 34 dma->allocated = 0; /* No one has allocated us yet */ in init_one_dvma() 35 switch(sbus_readl(dma->regs + DMA_CSR)&DMA_DEVICE_ID) { in init_one_dvma() 37 dma->revision = dvmarev0; in init_one_dvma() 41 dma->revision = dvmaesc1; in init_one_dvma() 45 dma->revision = dvmarev1; in init_one_dvma() 49 dma->revision = dvmarev2; in init_one_dvma() 53 dma->revision = dvmahme; in init_one_dvma() [all …]
|
/linux-2.4.37.9/drivers/char/drm-4.0/ |
D | dma.c | 41 if (!(dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER))) { in drm_dma_setup() 45 memset(dev->dma, 0, sizeof(*dev->dma)); in drm_dma_setup() 47 memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); in drm_dma_setup() 52 drm_device_dma_t *dma = dev->dma; in drm_dma_takedown() local 55 if (!dma) return; in drm_dma_takedown() 59 if (dma->bufs[i].seg_count) { in drm_dma_takedown() 63 dma->bufs[i].buf_count, in drm_dma_takedown() 64 dma->bufs[i].seg_count); in drm_dma_takedown() 65 for (j = 0; j < dma->bufs[i].seg_count; j++) { in drm_dma_takedown() 66 drm_free_pages(dma->bufs[i].seglist[j], in drm_dma_takedown() [all …]
|
D | mga_bufs.c | 43 drm_device_dma_t *dma = dev->dma; in mga_addbufs_agp() local 58 if (!dma) return -EINVAL; in mga_addbufs_agp() 94 entry = &dma->bufs[order]; in mga_addbufs_agp() 127 buf->idx = dma->buf_count + entry->buf_count; in mga_addbufs_agp() 156 dma->buflist = drm_realloc(dma->buflist, in mga_addbufs_agp() 157 dma->buf_count * sizeof(*dma->buflist), in mga_addbufs_agp() 158 (dma->buf_count + entry->buf_count) in mga_addbufs_agp() 159 * sizeof(*dma->buflist), in mga_addbufs_agp() 161 for (i = dma->buf_count; i < dma->buf_count + entry->buf_count; i++) in mga_addbufs_agp() 162 dma->buflist[i] = &entry->buflist[i - dma->buf_count]; in mga_addbufs_agp() [all …]
|
D | i810_bufs.c | 42 drm_device_dma_t *dma = dev->dma; in i810_addbufs_agp() local 57 if (!dma) return -EINVAL; in i810_addbufs_agp() 84 entry = &dma->bufs[order]; in i810_addbufs_agp() 113 buf->idx = dma->buf_count + entry->buf_count; in i810_addbufs_agp() 145 dma->buflist = drm_realloc(dma->buflist, in i810_addbufs_agp() 146 dma->buf_count * sizeof(*dma->buflist), in i810_addbufs_agp() 147 (dma->buf_count + entry->buf_count) in i810_addbufs_agp() 148 * sizeof(*dma->buflist), in i810_addbufs_agp() 150 for (i = dma->buf_count; i < dma->buf_count + entry->buf_count; i++) in i810_addbufs_agp() 151 dma->buflist[i] = &entry->buflist[i - dma->buf_count]; in i810_addbufs_agp() [all …]
|
D | bufs.c | 152 drm_device_dma_t *dma = dev->dma; in drm_addbufs() local 168 if (!dma) return -EINVAL; in drm_addbufs() 198 entry = &dma->bufs[order]; in drm_addbufs() 232 dma->pagelist = drm_realloc(dma->pagelist, in drm_addbufs() 233 dma->page_count * sizeof(*dma->pagelist), in drm_addbufs() 234 (dma->page_count + (count << page_order)) in drm_addbufs() 235 * sizeof(*dma->pagelist), in drm_addbufs() 238 dma->page_count + (count << page_order)); in drm_addbufs() 250 dma->page_count + page_count, in drm_addbufs() 252 dma->pagelist[dma->page_count + page_count++] in drm_addbufs() [all …]
|
D | r128_bufs.c | 46 drm_device_dma_t *dma = dev->dma; in r128_addbufs_agp() local 61 if (!dma) return -EINVAL; in r128_addbufs_agp() 99 entry = &dma->bufs[order]; in r128_addbufs_agp() 133 buf->idx = dma->buf_count + entry->buf_count; in r128_addbufs_agp() 137 buf->offset = (dma->byte_count + offset); in r128_addbufs_agp() 165 dma->buflist = drm_realloc(dma->buflist, in r128_addbufs_agp() 166 dma->buf_count * sizeof(*dma->buflist), in r128_addbufs_agp() 167 (dma->buf_count + entry->buf_count) in r128_addbufs_agp() 168 * sizeof(*dma->buflist), in r128_addbufs_agp() 170 for (i = dma->buf_count; i < dma->buf_count + entry->buf_count; i++) in r128_addbufs_agp() [all …]
|
D | radeon_bufs.c | 45 drm_device_dma_t *dma = dev->dma; in radeon_addbufs_agp() local 60 if (!dma) return -EINVAL; in radeon_addbufs_agp() 96 entry = &dma->bufs[order]; in radeon_addbufs_agp() 129 buf->idx = dma->buf_count + entry->buf_count; in radeon_addbufs_agp() 133 buf->offset = (dma->byte_count + offset); in radeon_addbufs_agp() 166 dma->buflist = drm_realloc(dma->buflist, in radeon_addbufs_agp() 167 dma->buf_count * sizeof(*dma->buflist), in radeon_addbufs_agp() 168 (dma->buf_count + entry->buf_count) in radeon_addbufs_agp() 169 * sizeof(*dma->buflist), in radeon_addbufs_agp() 171 for (i = dma->buf_count; i < dma->buf_count + entry->buf_count; i++) in radeon_addbufs_agp() [all …]
|
D | gamma_dma.c | 146 drm_device_dma_t *dma = dev->dma; in gamma_dma_service() local 155 atomic_inc(&dma->total_missed_free); in gamma_dma_service() 158 if (dma->this_buffer) { in gamma_dma_service() 159 drm_free_buffer(dev, dma->this_buffer); in gamma_dma_service() 160 dma->this_buffer = NULL; in gamma_dma_service() 177 drm_device_dma_t *dma = dev->dma; in gamma_do_dma() local 183 atomic_inc(&dma->total_missed_dma); in gamma_do_dma() 191 if (!dma->next_buffer) { in gamma_do_dma() 197 buf = dma->next_buffer; in gamma_do_dma() 233 atomic_inc(&dma->total_missed_lock); in gamma_do_dma() [all …]
|
/linux-2.4.37.9/drivers/sound/ |
D | rme96xx.c | 325 } dma[RME96xx_MAX_DEVS]; member 561 static void rme96xx_clearbufs(struct dmabuf* dma) in rme96xx_clearbufs() argument 568 for (j=0;j<dma->outchannels + dma->mono;j++) in rme96xx_clearbufs() 569 memset(&dma->s->playbuf[(dma->outoffset + j)*RME96xx_DMA_MAX_SAMPLES], in rme96xx_clearbufs() 572 spin_lock_irqsave(&dma->s->lock,flags); in rme96xx_clearbufs() 573 dma->writeptr = 0; in rme96xx_clearbufs() 574 dma->readptr = 0; in rme96xx_clearbufs() 575 spin_unlock_irqrestore(&dma->s->lock,flags); in rme96xx_clearbufs() 621 inline int rme96xx_getospace(struct dmabuf * dma, unsigned int hwp) in rme96xx_getospace() argument 627 spin_lock_irqsave(&dma->s->lock,flags); in rme96xx_getospace() [all …]
|
D | pas2_card.c | 187 if (hw_config->dma < 0 || hw_config->dma > 7) in config_pas_hw() 189 printk(KERN_ERR "PAS16: Invalid DMA selection %d", hw_config->dma); in config_pas_hw() 190 hw_config->dma=-1; in config_pas_hw() 195 pas_write(dma_bits[hw_config->dma], 0xF389); in config_pas_hw() 196 if (!dma_bits[hw_config->dma]) in config_pas_hw() 198 printk(KERN_ERR "PAS16: Invalid DMA selection %d", hw_config->dma); in config_pas_hw() 199 hw_config->dma=-1; in config_pas_hw() 204 if (sound_alloc_dma(hw_config->dma, "PAS16")) in config_pas_hw() 207 hw_config->dma=-1; in config_pas_hw() 264 if (!sb_dma_bits[sb_config->dma]) in config_pas_hw() [all …]
|
/linux-2.4.37.9/drivers/char/drm/ |
D | drm_dma.h | 58 dev->dma = DRM(alloc)( sizeof(*dev->dma), DRM_MEM_DRIVER ); in DRM() 59 if ( !dev->dma ) in DRM() 62 memset( dev->dma, 0, sizeof(*dev->dma) ); in DRM() 65 memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); in DRM() 72 drm_device_dma_t *dma = dev->dma; in DRM() local 75 if (!dma) return; in DRM() 79 if (dma->bufs[i].seg_count) { in DRM() 83 dma->bufs[i].buf_count, in DRM() 84 dma->bufs[i].seg_count); in DRM() 85 for (j = 0; j < dma->bufs[i].seg_count; j++) { in DRM() [all …]
|
D | drm_bufs.h | 311 drm_device_dma_t *dma = dev->dma; in DRM() local 327 if ( !dma ) return -EINVAL; in DRM() 365 entry = &dma->bufs[order]; in DRM() 394 buf->idx = dma->buf_count + entry->buf_count; in DRM() 399 buf->offset = (dma->byte_count + offset); in DRM() 434 temp_buflist = DRM(realloc)( dma->buflist, in DRM() 435 dma->buf_count * sizeof(*dma->buflist), in DRM() 436 (dma->buf_count + entry->buf_count) in DRM() 437 * sizeof(*dma->buflist), in DRM() 446 dma->buflist = temp_buflist; in DRM() [all …]
|
/linux-2.4.37.9/drivers/net/appletalk/ |
D | ltpc.c | 207 static int dma; variable 374 int dma = dev->dma; in handlefc() local 380 disable_dma(dma); in handlefc() 381 clear_dma_ff(dma); in handlefc() 382 set_dma_mode(dma,DMA_MODE_READ); in handlefc() 383 set_dma_addr(dma,virt_to_bus(ltdmacbuf)); in handlefc() 384 set_dma_count(dma,50); in handlefc() 385 enable_dma(dma); in handlefc() 397 int dma = dev->dma; in handlefd() local 402 disable_dma(dma); in handlefd() [all …]
|
/linux-2.4.37.9/include/asm-sparc/ |
D | dma.h | 93 #define DMA_ISBROKEN(dma) ((dma)->revision == dvmarev0 || (dma)->revision == dvmarev1) argument 95 #define DMA_ISBROKEN(dma) ((dma)->revision == dvmarev1) argument 97 #define DMA_ISESC1(dma) ((dma)->revision == dvmaesc1) argument 188 #define DMA_IRQ_ENTRY(dma, dregs) do { \ argument 189 if(DMA_ISBROKEN(dma)) DMA_INTSOFF(dregs); \ 192 #define DMA_IRQ_EXIT(dma, dregs) do { \ argument 193 if(DMA_ISBROKEN(dma)) DMA_INTSON(dregs); \ 217 #define DMA_RESET(dma) do { \ 218 struct sparc_dma_registers *regs = dma->regs; \ 227 if(dma->revision>dvmarev1) regs->cond_reg |= DMA_3CLKS; \ [all …]
|