summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/arm-smmu.c
diff options
context:
space:
mode:
authorNipun Gupta2018-09-10 15:49:18 +0200
committerJoerg Roedel2018-09-25 09:47:53 +0200
commiteab03e2a1a3d9d354943aff5ae5e4254ee1ec967 (patch)
treed4d10dcf2c4f8509c1fc66ac1237044f7fcacfa7 /drivers/iommu/arm-smmu.c
parentiommu/of: support iommu configuration for fsl-mc devices (diff)
downloadkernel-qcow2-linux-eab03e2a1a3d9d354943aff5ae5e4254ee1ec967.tar.gz
kernel-qcow2-linux-eab03e2a1a3d9d354943aff5ae5e4254ee1ec967.tar.xz
kernel-qcow2-linux-eab03e2a1a3d9d354943aff5ae5e4254ee1ec967.zip
iommu/arm-smmu: Add support for the fsl-mc bus
Implement bus specific support for the fsl-mc bus including registering arm_smmu_ops and bus specific device add operations. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/arm-smmu.c')
-rw-r--r--drivers/iommu/arm-smmu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index fd1b80ef9490..7baf4b03e8ef 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -52,6 +52,7 @@
#include <linux/spinlock.h>
#include <linux/amba/bus.h>
+#include <linux/fsl/mc.h>
#include "io-pgtable.h"
#include "arm-smmu-regs.h"
@@ -1459,6 +1460,8 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev)
if (dev_is_pci(dev))
group = pci_device_group(dev);
+ else if (dev_is_fsl_mc(dev))
+ group = fsl_mc_device_group(dev);
else
group = generic_device_group(dev);
@@ -2036,6 +2039,10 @@ static void arm_smmu_bus_init(void)
bus_set_iommu(&pci_bus_type, &arm_smmu_ops);
}
#endif
+#ifdef CONFIG_FSL_MC_BUS
+ if (!iommu_present(&fsl_mc_bus_type))
+ bus_set_iommu(&fsl_mc_bus_type, &arm_smmu_ops);
+#endif
}
static int arm_smmu_device_probe(struct platform_device *pdev)