From 7feaeeb9ffb59754e67e85cbedc83b86e499c092 Mon Sep 17 00:00:00 2001 From: Randy Li Date: Tue, 25 Dec 2018 17:38:08 +0800 Subject: [PATCH] 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 --- drivers/iommu/rockchip-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index fc9c6b670975..979a2c40bc9c 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -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;