Lines Matching refs:dma
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()
102 ++dma->dma_b; in start_sa1111_sac_dma()
117 sa1100_dma_t *dma = (sa1100_dma_t *) dev_id; in sa1111_sac_dma_irq() local
120 dma->last_dma?'B':'A', dma->regs->SAD_CS); in sa1111_sac_dma_irq()
137 if(dma->last_dma == 0){ in sa1111_sac_dma_irq()
139 dma->regs->SAD_CS = 0; in sa1111_sac_dma_irq()
141 dma->dma_a = dma->dma_b = 0; in sa1111_sac_dma_irq()
143 if(dma->dma_a == 0) in sa1111_sac_dma_irq()
146 --dma->dma_a; in sa1111_sac_dma_irq()
157 dma->regs->SAD_CS = SAD_CS_DBDA | SAD_CS_DEN; /* w1c */ in sa1111_sac_dma_irq()
158 dma->last_dma = 0; in sa1111_sac_dma_irq()
162 if(dma->last_dma == 1){ in sa1111_sac_dma_irq()
164 dma->regs->SAD_CS = 0; in sa1111_sac_dma_irq()
166 dma->dma_a = dma->dma_b = 0; in sa1111_sac_dma_irq()
168 if(dma->dma_b == 0) in sa1111_sac_dma_irq()
171 --dma->dma_b; in sa1111_sac_dma_irq()
179 dma->regs->SAD_CS = SAD_CS_DBDB | SAD_CS_DEN; /* w1c */ in sa1111_sac_dma_irq()
180 dma->last_dma = 1; in sa1111_sac_dma_irq()
185 sa1100_dma_done (dma); in sa1111_sac_dma_irq()
192 sa1100_dma_t *dma = NULL; in sa1111_sac_request_dma() local
205 dma = &dma_chan[ch]; in sa1111_sac_request_dma()
207 if (xchg(&dma->in_use, 1) == 1) { in sa1111_sac_request_dma()
215 device_id, (void *) dma); in sa1111_sac_request_dma()
220 dma->in_use = 0; in sa1111_sac_request_dma()
226 device_id, (void *) dma); in sa1111_sac_request_dma()
231 dma->in_use = 0; in sa1111_sac_request_dma()
236 dma->device_id = device_id; in sa1111_sac_request_dma()
237 dma->callback = NULL; in sa1111_sac_request_dma()
238 dma->spin_size = 0; in sa1111_sac_request_dma()
248 sa1100_dma_t *dma = &dma_chan[channel]; in sa1111_dma_get_current() local
252 if (dma->curr && dma->spin_ref <= 0) { in sa1111_dma_get_current()
253 dma_buf_t *buf = dma->curr; in sa1111_dma_get_current()
282 sa1100_dma_t *dma = &dma_chan[channel]; in sa1111_cleanup_sac_dma() local
283 free_irq(AUDXMTDMADONEA + (channel - SA1111_SAC_DMA_BASE), (void*) dma); in sa1111_cleanup_sac_dma()
284 free_irq(AUDXMTDMADONEB + (channel - SA1111_SAC_DMA_BASE), (void*) dma); in sa1111_cleanup_sac_dma()