• Home
  • Raw
  • Download

Lines Matching refs:dom

180 static struct mtk_iommu_domain *to_mtk_domain(struct iommu_domain *dom)  in to_mtk_domain()  argument
182 return container_of(dom, struct mtk_iommu_domain, domain); in to_mtk_domain()
250 struct mtk_iommu_domain *dom = data->m4u_dom; in mtk_iommu_isr() local
277 if (report_iommu_fault(&dom->domain, data->dev, fault_iova, in mtk_iommu_isr()
319 static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom) in mtk_iommu_domain_finalise() argument
323 dom->cfg = (struct io_pgtable_cfg) { in mtk_iommu_domain_finalise()
335 dom->iop = alloc_io_pgtable_ops(ARM_V7S, &dom->cfg, data); in mtk_iommu_domain_finalise()
336 if (!dom->iop) { in mtk_iommu_domain_finalise()
342 dom->domain.pgsize_bitmap = dom->cfg.pgsize_bitmap; in mtk_iommu_domain_finalise()
348 struct mtk_iommu_domain *dom; in mtk_iommu_domain_alloc() local
353 dom = kzalloc(sizeof(*dom), GFP_KERNEL); in mtk_iommu_domain_alloc()
354 if (!dom) in mtk_iommu_domain_alloc()
357 if (iommu_get_dma_cookie(&dom->domain)) in mtk_iommu_domain_alloc()
360 if (mtk_iommu_domain_finalise(dom)) in mtk_iommu_domain_alloc()
363 dom->domain.geometry.aperture_start = 0; in mtk_iommu_domain_alloc()
364 dom->domain.geometry.aperture_end = DMA_BIT_MASK(32); in mtk_iommu_domain_alloc()
365 dom->domain.geometry.force_aperture = true; in mtk_iommu_domain_alloc()
367 return &dom->domain; in mtk_iommu_domain_alloc()
370 iommu_put_dma_cookie(&dom->domain); in mtk_iommu_domain_alloc()
372 kfree(dom); in mtk_iommu_domain_alloc()
378 struct mtk_iommu_domain *dom = to_mtk_domain(domain); in mtk_iommu_domain_free() local
380 free_io_pgtable_ops(dom->iop); in mtk_iommu_domain_free()
389 struct mtk_iommu_domain *dom = to_mtk_domain(domain); in mtk_iommu_attach_device() local
396 data->m4u_dom = dom; in mtk_iommu_attach_device()
397 writel(dom->cfg.arm_v7s_cfg.ttbr & MMU_PT_ADDR_MASK, in mtk_iommu_attach_device()
419 struct mtk_iommu_domain *dom = to_mtk_domain(domain); in mtk_iommu_map() local
427 return dom->iop->map(dom->iop, iova, paddr, size, prot, gfp); in mtk_iommu_map()
434 struct mtk_iommu_domain *dom = to_mtk_domain(domain); in mtk_iommu_unmap() local
436 return dom->iop->unmap(dom->iop, iova, size, gather); in mtk_iommu_unmap()
460 struct mtk_iommu_domain *dom = to_mtk_domain(domain); in mtk_iommu_iova_to_phys() local
464 pa = dom->iop->iova_to_phys(dom->iop, iova); in mtk_iommu_iova_to_phys()