Lines Matching refs:pmap
42 diva_dma_map_entry_t *pmap = diva_os_malloc(0, sizeof(*pmap) * (nentries + 1)); in diva_alloc_dma_map() local
43 if (pmap) in diva_alloc_dma_map()
44 memset(pmap, 0, sizeof(*pmap) * (nentries + 1)); in diva_alloc_dma_map()
45 return pmap; in diva_alloc_dma_map()
50 void diva_free_dma_mapping(struct _diva_dma_map_entry *pmap) { in diva_free_dma_mapping() argument
51 if (pmap) { in diva_free_dma_mapping()
52 diva_os_free(0, pmap); in diva_free_dma_mapping()
58 void diva_init_dma_map_entry(struct _diva_dma_map_entry *pmap, in diva_init_dma_map_entry() argument
61 pmap[nr].phys_bus_addr = phys; in diva_init_dma_map_entry()
62 pmap[nr].local_ram_addr = virt; in diva_init_dma_map_entry()
63 pmap[nr].addr_handle = addr_handle; in diva_init_dma_map_entry()
68 int diva_alloc_dma_map_entry(struct _diva_dma_map_entry *pmap) { in diva_alloc_dma_map_entry() argument
70 for (i = 0; (pmap && pmap[i].local_ram_addr); i++) { in diva_alloc_dma_map_entry()
71 if (!pmap[i].busy) { in diva_alloc_dma_map_entry()
72 pmap[i].busy = 1; in diva_alloc_dma_map_entry()
81 void diva_free_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr) { in diva_free_dma_map_entry() argument
82 pmap[nr].busy = 0; in diva_free_dma_map_entry()
87 void diva_get_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr, in diva_get_dma_map_entry() argument
89 *pphys = pmap[nr].phys_bus_addr; in diva_get_dma_map_entry()
90 *pvirt = pmap[nr].local_ram_addr; in diva_get_dma_map_entry()
92 void *diva_get_entry_handle(struct _diva_dma_map_entry *pmap, int nr) { in diva_get_entry_handle() argument
93 return (pmap[nr].addr_handle); in diva_get_entry_handle()