summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2023-01-23 10:31:01 +0100
committerJoerg Roedel <jroedel@suse.de>2023-02-03 10:41:24 +0100
commit189d496b48b1731f21f19ff3b7109ec724f5dcb2 (patch)
treecce666c2a7f258c9135a0a1ca090fd7590490433
parentff489fe002ab20daf0985f119682474cfda83496 (diff)
iommu/exynos: Add missing set_platform_dma_ops callback
Add set_platform_dma_ops() required for proper driver operation on ARM 32bit arch after recent changes in the IOMMU framework (detach ops removal). Fixes: c1fe9119ee70 ("iommu: Add set_platform_dma_ops callbacks") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20230123093102.12392-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/exynos-iommu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 29ec713e8a21..7eaa58ced4ae 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -1346,8 +1346,10 @@ static void exynos_iommu_release_device(struct device *dev)
struct iommu_group *group = iommu_group_get(dev);
if (group) {
+#ifndef CONFIG_ARM
WARN_ON(owner->domain !=
iommu_group_default_domain(group));
+#endif
exynos_iommu_detach_device(owner->domain, dev);
iommu_group_put(group);
}
@@ -1398,6 +1400,9 @@ static int exynos_iommu_of_xlate(struct device *dev,
static const struct iommu_ops exynos_iommu_ops = {
.domain_alloc = exynos_iommu_domain_alloc,
.device_group = generic_device_group,
+#ifdef CONFIG_ARM
+ .set_platform_dma_ops = exynos_iommu_release_device,
+#endif
.probe_device = exynos_iommu_probe_device,
.release_device = exynos_iommu_release_device,
.pgsize_bitmap = SECT_SIZE | LPAGE_SIZE | SPAGE_SIZE,