Lines Matching refs:dma
89 struct dma_s *dma = (struct dma_s *) ch->dma; in soc_dma_ch_schedule() local
91 timer_mod(ch->timer, now + delay_bytes / dma->channel_freq); in soc_dma_ch_schedule()
99 ch->dma->setup_fn(ch); in soc_dma_ch_run()
108 static inline struct memmap_entry_s *soc_dma_lookup(struct dma_s *dma, in soc_dma_lookup() argument
114 lo = dma->memmap; in soc_dma_lookup()
115 hi = dma->memmap_size; in soc_dma_lookup()
129 struct dma_s *dma = (struct dma_s *) ch->dma; in soc_dma_ch_update_type() local
130 struct memmap_entry_s *entry = soc_dma_lookup(dma, ch->vaddr[port]); in soc_dma_ch_update_type()
133 while (entry < dma->memmap + dma->memmap_size && in soc_dma_ch_update_type()
171 ch->transfer_fn = ch->dma->transfer_fn; in soc_dma_ch_update()
186 ch->transfer_fn = ch->dma->transfer_fn; in soc_dma_ch_update()
207 struct dma_s *dma = (struct dma_s *) ch->dma; in soc_dma_set_request() local
209 dma->enabled_count += level - ch->enable; in soc_dma_set_request()
212 dma->ch_enable_mask |= (uint64_t)1 << ch->num; in soc_dma_set_request()
214 dma->ch_enable_mask &= ~((uint64_t)1 << ch->num); in soc_dma_set_request()
217 soc_dma_ch_freq_update(dma); in soc_dma_set_request()
248 s->ch[i].dma = &s->soc; in soc_dma_init()
263 struct dma_s *dma = (struct dma_s *) soc; in soc_dma_port_add_fifo() local
265 dma->memmap = g_realloc(dma->memmap, sizeof(*entry) * in soc_dma_port_add_fifo()
266 (dma->memmap_size + 1)); in soc_dma_port_add_fifo()
267 entry = soc_dma_lookup(dma, virt_base); in soc_dma_port_add_fifo()
269 if (dma->memmap_size) { in soc_dma_port_add_fifo()
284 while (entry < dma->memmap + dma->memmap_size && in soc_dma_port_add_fifo()
297 (uint8_t *) (dma->memmap + dma->memmap_size ++) - in soc_dma_port_add_fifo()
300 dma->memmap_size ++; in soc_dma_port_add_fifo()
313 struct dma_s *dma = (struct dma_s *) soc; in soc_dma_port_add_mem() local
315 dma->memmap = g_realloc(dma->memmap, sizeof(*entry) * in soc_dma_port_add_mem()
316 (dma->memmap_size + 1)); in soc_dma_port_add_mem()
317 entry = soc_dma_lookup(dma, virt_base); in soc_dma_port_add_mem()
319 if (dma->memmap_size) { in soc_dma_port_add_mem()
344 while (entry < dma->memmap + dma->memmap_size && in soc_dma_port_add_mem()
350 (uint8_t *) (dma->memmap + dma->memmap_size ++) - in soc_dma_port_add_mem()
353 dma->memmap_size ++; in soc_dma_port_add_mem()