Lines Matching full:entry
130 struct memmap_entry_s *entry = soc_dma_lookup(dma, ch->vaddr[port]); in soc_dma_ch_update_type() local
132 if (entry->type == soc_dma_port_fifo) { in soc_dma_ch_update_type()
133 while (entry < dma->memmap + dma->memmap_size && in soc_dma_ch_update_type()
134 entry->u.fifo.out != port) in soc_dma_ch_update_type()
135 entry ++; in soc_dma_ch_update_type()
136 if (entry->addr != ch->vaddr[port] || entry->u.fifo.out != port) in soc_dma_ch_update_type()
142 ch->io_fn[port] = entry->u.fifo.fn; in soc_dma_ch_update_type()
143 ch->io_opaque[port] = entry->u.fifo.opaque; in soc_dma_ch_update_type()
145 } else if (entry->type == soc_dma_port_mem) { in soc_dma_ch_update_type()
146 if (entry->addr > ch->vaddr[port] || in soc_dma_ch_update_type()
147 entry->addr + entry->u.mem.size <= ch->vaddr[port]) in soc_dma_ch_update_type()
155 ch->paddr[port] = (uint8_t *) entry->u.mem.base + in soc_dma_ch_update_type()
156 (ch->vaddr[port] - entry->addr); in soc_dma_ch_update_type()
262 struct memmap_entry_s *entry; in soc_dma_port_add_fifo() local
265 dma->memmap = g_realloc(dma->memmap, sizeof(*entry) * in soc_dma_port_add_fifo()
267 entry = soc_dma_lookup(dma, virt_base); in soc_dma_port_add_fifo()
270 if (entry->type == soc_dma_port_mem) { in soc_dma_port_add_fifo()
271 if (entry->addr <= virt_base && in soc_dma_port_add_fifo()
272 entry->addr + entry->u.mem.size > virt_base) { in soc_dma_port_add_fifo()
276 virt_base, entry->addr, in soc_dma_port_add_fifo()
277 (entry->addr + entry->u.mem.size)); in soc_dma_port_add_fifo()
281 if (entry->addr <= virt_base) in soc_dma_port_add_fifo()
282 entry ++; in soc_dma_port_add_fifo()
284 while (entry < dma->memmap + dma->memmap_size && in soc_dma_port_add_fifo()
285 entry->addr <= virt_base) { in soc_dma_port_add_fifo()
286 if (entry->addr == virt_base && entry->u.fifo.out == out) { in soc_dma_port_add_fifo()
289 __func__, virt_base, entry->addr); in soc_dma_port_add_fifo()
293 entry ++; in soc_dma_port_add_fifo()
296 memmove(entry + 1, entry, in soc_dma_port_add_fifo()
298 (uint8_t *) entry); in soc_dma_port_add_fifo()
302 entry->addr = virt_base; in soc_dma_port_add_fifo()
303 entry->type = soc_dma_port_fifo; in soc_dma_port_add_fifo()
304 entry->u.fifo.fn = fn; in soc_dma_port_add_fifo()
305 entry->u.fifo.opaque = opaque; in soc_dma_port_add_fifo()
306 entry->u.fifo.out = out; in soc_dma_port_add_fifo()
312 struct memmap_entry_s *entry; in soc_dma_port_add_mem() local
315 dma->memmap = g_realloc(dma->memmap, sizeof(*entry) * in soc_dma_port_add_mem()
317 entry = soc_dma_lookup(dma, virt_base); in soc_dma_port_add_mem()
320 if (entry->type == soc_dma_port_mem) { in soc_dma_port_add_mem()
321 if ((entry->addr >= virt_base && entry->addr < virt_base + size) || in soc_dma_port_add_mem()
322 (entry->addr <= virt_base && in soc_dma_port_add_mem()
323 entry->addr + entry->u.mem.size > virt_base)) { in soc_dma_port_add_mem()
328 entry->addr, entry->addr + entry->u.mem.size); in soc_dma_port_add_mem()
332 if (entry->addr <= virt_base) in soc_dma_port_add_mem()
333 entry ++; in soc_dma_port_add_mem()
335 if (entry->addr >= virt_base && in soc_dma_port_add_mem()
336 entry->addr < virt_base + size) { in soc_dma_port_add_mem()
340 entry->addr); in soc_dma_port_add_mem()
344 while (entry < dma->memmap + dma->memmap_size && in soc_dma_port_add_mem()
345 entry->addr <= virt_base) in soc_dma_port_add_mem()
346 entry ++; in soc_dma_port_add_mem()
349 memmove(entry + 1, entry, in soc_dma_port_add_mem()
351 (uint8_t *) entry); in soc_dma_port_add_mem()
355 entry->addr = virt_base; in soc_dma_port_add_mem()
356 entry->type = soc_dma_port_mem; in soc_dma_port_add_mem()
357 entry->u.mem.base = phys_base; in soc_dma_port_add_mem()
358 entry->u.mem.size = size; in soc_dma_port_add_mem()