Lines Matching refs:trident

22 #define __set_tlb_bus(trident,page,ptr,addr) \  argument
23 do { (trident)->tlb.entries[page] = cpu_to_le32((addr) & ~(SNDRV_TRIDENT_PAGE_SIZE-1)); \
24 (trident)->tlb.shadow_entries[page] = (ptr); } while (0)
25 #define __tlb_to_ptr(trident,page) \ argument
26 (void*)((trident)->tlb.shadow_entries[page])
27 #define __tlb_to_addr(trident,page) \ argument
28 (dma_addr_t)le32_to_cpu((trident->tlb.entries[page]) & ~(SNDRV_TRIDENT_PAGE_SIZE - 1))
35 #define set_tlb_bus(trident,page,ptr,addr) __set_tlb_bus(trident,page,ptr,addr) argument
37 #define set_silent_tlb(trident,page) __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silen… argument
43 #define page_to_ptr(trident,page) __tlb_to_ptr(trident, page) argument
45 #define page_to_addr(trident,page) __tlb_to_addr(trident, page) argument
53 #define page_to_ptr(trident,page) __tlb_to_ptr(trident, (page) << 1) argument
54 #define page_to_addr(trident,page) __tlb_to_addr(trident, (page) << 1) argument
57 static inline void set_tlb_bus(struct snd_trident *trident, int page, in set_tlb_bus() argument
61 __set_tlb_bus(trident, page, ptr, addr); in set_tlb_bus()
62 __set_tlb_bus(trident, page+1, ptr + SNDRV_TRIDENT_PAGE_SIZE, addr + SNDRV_TRIDENT_PAGE_SIZE); in set_tlb_bus()
64 static inline void set_silent_tlb(struct snd_trident *trident, int page) in set_silent_tlb() argument
67 …__set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_pag… in set_silent_tlb()
68 …__set_tlb_bus(trident, page+1, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_p… in set_silent_tlb()
83 #define page_to_ptr(trident,page) __tlb_to_ptr(trident, (page) * UNIT_PAGES) argument
84 #define page_to_addr(trident,page) __tlb_to_addr(trident, (page) * UNIT_PAGES) argument
87 static inline void set_tlb_bus(struct snd_trident *trident, int page, in set_tlb_bus() argument
93 __set_tlb_bus(trident, page, ptr, addr); in set_tlb_bus()
98 static inline void set_silent_tlb(struct snd_trident *trident, int page) in set_silent_tlb() argument
103 …__set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_pag… in set_silent_tlb()
109 static inline void *offset_ptr(struct snd_trident *trident, int offset) in offset_ptr() argument
112 ptr = page_to_ptr(trident, get_aligned_page(offset)); in offset_ptr()
174 snd_trident_alloc_sg_pages(struct snd_trident *trident, in snd_trident_alloc_sg_pages() argument
186 hdr = trident->tlb.memhdr; in snd_trident_alloc_sg_pages()
211 set_tlb_bus(trident, page, ptr, addr); in snd_trident_alloc_sg_pages()
221 snd_trident_alloc_cont_pages(struct snd_trident *trident, in snd_trident_alloc_cont_pages() argument
235 hdr = trident->tlb.memhdr; in snd_trident_alloc_cont_pages()
256 set_tlb_bus(trident, page, ptr, addr); in snd_trident_alloc_cont_pages()
266 snd_trident_alloc_pages(struct snd_trident *trident, in snd_trident_alloc_pages() argument
269 if (snd_BUG_ON(!trident || !substream)) in snd_trident_alloc_pages()
272 return snd_trident_alloc_sg_pages(trident, substream); in snd_trident_alloc_pages()
274 return snd_trident_alloc_cont_pages(trident, substream); in snd_trident_alloc_pages()
281 int snd_trident_free_pages(struct snd_trident *trident, in snd_trident_free_pages() argument
287 if (snd_BUG_ON(!trident || !blk)) in snd_trident_free_pages()
290 hdr = trident->tlb.memhdr; in snd_trident_free_pages()
294 set_silent_tlb(trident, page); in snd_trident_free_pages()