diff options
author | Nipun Gupta <nipun.gupta@nxp.com> | 2018-09-10 19:19:18 +0530 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-09-25 09:47:53 +0200 |
commit | eab03e2a1a3d9d354943aff5ae5e4254ee1ec967 (patch) | |
tree | d4d10dcf2c4f8509c1fc66ac1237044f7fcacfa7 /drivers/iommu/iommu.c | |
parent | fa0656b40e0fb0135d7d229c8ab0261fe741af7b (diff) |
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/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 8c15c5980299..7e5cb7cf2bbe 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -32,6 +32,7 @@ #include <linux/pci.h> #include <linux/bitops.h> #include <linux/property.h> +#include <linux/fsl/mc.h> #include <trace/events/iommu.h> static struct kset *iommu_group_kset; @@ -1024,6 +1025,18 @@ struct iommu_group *pci_device_group(struct device *dev) return iommu_group_alloc(); } +/* Get the IOMMU group for device on fsl-mc bus */ +struct iommu_group *fsl_mc_device_group(struct device *dev) +{ + struct device *cont_dev = fsl_mc_cont_dev(dev); + struct iommu_group *group; + + group = iommu_group_get(cont_dev); + if (!group) + group = iommu_group_alloc(); + return group; +} + /** * iommu_group_get_for_dev - Find or create the IOMMU group for a device * @dev: target device |