iommu/rockchip: assign driver iommu ops to domain

It would help the other driver to install the DMA ops for
itself.

Change-Id: I4c7283bbd8889650684630e169696133fdc6801a
Signed-off-by: Randy Li <randy.li@rock-chips.com>
This commit is contained in:
Randy Li
2018-12-25 17:38:08 +08:00
committed by Tao Huang
parent fad451203d
commit 7feaeeb9ff

View File

@@ -79,6 +79,7 @@
#define IOMMU_INV_TLB_ENTIRE BIT(4) /* invalidate tlb entire */
static LIST_HEAD(iommu_dev_list);
static const struct iommu_ops rk_iommu_ops;
struct rk_iommu_domain {
struct list_head iommus;
@@ -1106,6 +1107,7 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type)
rk_domain->domain.geometry.aperture_start = 0;
rk_domain->domain.geometry.aperture_end = DMA_BIT_MASK(32);
rk_domain->domain.geometry.force_aperture = true;
rk_domain->domain.ops = &rk_iommu_ops;
return &rk_domain->domain;