diff options
author | Nipun Gupta <nipun.gupta@nxp.com> | 2016-12-05 01:16:07 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:33 (GMT) |
commit | 081ea506784a4afb798c16ab100a65eadd61456a (patch) | |
tree | 8aba8603b3daf8ae0cf01b100e6a726c34cfa3ff | |
parent | 237e1a6534f7b5c384b855846bceb4a33c045413 (diff) | |
download | linux-081ea506784a4afb798c16ab100a65eadd61456a.tar.xz |
iommu: arm-smmu: Add support for the fsl-mc bus
Implement bus specific support for the fsl-mc bus including
registering the arm_smmu_ops and bus specific device add operations.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
-rw-r--r-- | drivers/iommu/arm-smmu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 82d3aae..aa80a7d 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -49,6 +49,7 @@ #include <linux/spinlock.h> #include <linux/amba/bus.h> +#include "../staging/fsl-mc/include/mc-bus.h" #include "io-pgtable.h" @@ -1485,6 +1486,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); @@ -2027,6 +2030,11 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev) 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 + return 0; } |