Commit 87ceb375 authored by Lucas Stach's avatar Lucas Stach

drm/etnaviv: remove iova_to_phys iommu ops

They are not used in any way, so can go away.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Reviewed-By: default avatarWladimir J. van der Laan <laanwj@gmail.com>
parent 3bc3e0ec
...@@ -66,18 +66,6 @@ static void pgtable_free(struct etnaviv_iommu_domain_pgtable *pgtable, ...@@ -66,18 +66,6 @@ static void pgtable_free(struct etnaviv_iommu_domain_pgtable *pgtable,
dma_free_coherent(NULL, size, pgtable->pgtable, pgtable->paddr); dma_free_coherent(NULL, size, pgtable->pgtable, pgtable->paddr);
} }
static u32 pgtable_read(struct etnaviv_iommu_domain_pgtable *pgtable,
unsigned long iova)
{
/* calcuate index into page table */
unsigned int index = (iova - GPU_MEM_START) / SZ_4K;
phys_addr_t paddr;
paddr = pgtable->pgtable[index];
return paddr;
}
static void pgtable_write(struct etnaviv_iommu_domain_pgtable *pgtable, static void pgtable_write(struct etnaviv_iommu_domain_pgtable *pgtable,
unsigned long iova, phys_addr_t paddr) unsigned long iova, phys_addr_t paddr)
{ {
...@@ -164,14 +152,6 @@ static size_t etnaviv_iommuv1_unmap(struct iommu_domain *domain, ...@@ -164,14 +152,6 @@ static size_t etnaviv_iommuv1_unmap(struct iommu_domain *domain,
return SZ_4K; return SZ_4K;
} }
static phys_addr_t etnaviv_iommu_iova_to_phys(struct iommu_domain *domain,
dma_addr_t iova)
{
struct etnaviv_iommu_domain *etnaviv_domain = to_etnaviv_domain(domain);
return pgtable_read(&etnaviv_domain->pgtable, iova);
}
static size_t etnaviv_iommuv1_dump_size(struct iommu_domain *domain) static size_t etnaviv_iommuv1_dump_size(struct iommu_domain *domain)
{ {
return PT_SIZE; return PT_SIZE;
...@@ -189,7 +169,6 @@ static const struct etnaviv_iommu_ops etnaviv_iommu_ops = { ...@@ -189,7 +169,6 @@ static const struct etnaviv_iommu_ops etnaviv_iommu_ops = {
.domain_free = etnaviv_domain_free, .domain_free = etnaviv_domain_free,
.map = etnaviv_iommuv1_map, .map = etnaviv_iommuv1_map,
.unmap = etnaviv_iommuv1_unmap, .unmap = etnaviv_iommuv1_unmap,
.iova_to_phys = etnaviv_iommu_iova_to_phys,
.pgsize_bitmap = SZ_4K, .pgsize_bitmap = SZ_4K,
}, },
.dump_size = etnaviv_iommuv1_dump_size, .dump_size = etnaviv_iommuv1_dump_size,
......
...@@ -97,19 +97,6 @@ static size_t etnaviv_iommuv2_unmap(struct iommu_domain *domain, ...@@ -97,19 +97,6 @@ static size_t etnaviv_iommuv2_unmap(struct iommu_domain *domain,
return SZ_4K; return SZ_4K;
} }
static phys_addr_t etnaviv_iommuv2_iova_to_phys(struct iommu_domain *domain,
dma_addr_t iova)
{
struct etnaviv_iommuv2_domain *etnaviv_domain =
to_etnaviv_domain(domain);
int mtlb_entry, stlb_entry;
mtlb_entry = (iova & MMUv2_MTLB_MASK) >> MMUv2_MTLB_SHIFT;
stlb_entry = (iova & MMUv2_STLB_MASK) >> MMUv2_STLB_SHIFT;
return etnaviv_domain->stlb_cpu[mtlb_entry][stlb_entry] & ~(SZ_4K - 1);
}
static int etnaviv_iommuv2_init(struct etnaviv_iommuv2_domain *etnaviv_domain) static int etnaviv_iommuv2_init(struct etnaviv_iommuv2_domain *etnaviv_domain)
{ {
u32 *p; u32 *p;
...@@ -235,7 +222,6 @@ static const struct etnaviv_iommu_ops etnaviv_iommu_ops = { ...@@ -235,7 +222,6 @@ static const struct etnaviv_iommu_ops etnaviv_iommu_ops = {
.domain_free = etnaviv_iommuv2_domain_free, .domain_free = etnaviv_iommuv2_domain_free,
.map = etnaviv_iommuv2_map, .map = etnaviv_iommuv2_map,
.unmap = etnaviv_iommuv2_unmap, .unmap = etnaviv_iommuv2_unmap,
.iova_to_phys = etnaviv_iommuv2_iova_to_phys,
.pgsize_bitmap = SZ_4K, .pgsize_bitmap = SZ_4K,
}, },
.dump_size = etnaviv_iommuv2_dump_size, .dump_size = etnaviv_iommuv2_dump_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment