diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-07-15 14:34:56 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-07-17 12:21:29 +0100 |
commit | 1c466fb884bdb8d8384f6dea0be2bb655dd674bc (patch) | |
tree | 23464a2216a34cce5df0238aa9b970ad8b68c20c | |
parent | 21cef4ada56547820c6fe2fad7b6374d664ccce7 (diff) |
iommu/arm-smmu: Remove PCI related code
The features to support this aren't in Linux 3.10
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | drivers/iommu/arm-smmu.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 5b5b83415d9f..61eb249315ad 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -36,7 +36,6 @@ #include <linux/iommu.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/pci.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/spinlock.h> @@ -364,14 +363,6 @@ static void parse_driver_options(struct arm_smmu_device *smmu) static struct device_node *dev_get_dev_node(struct device *dev) { - if (dev_is_pci(dev)) { - struct pci_bus *bus = to_pci_dev(dev)->bus; - - while (!pci_is_root_bus(bus)) - bus = bus->parent; - return bus->bridge->parent->of_node; - } - return dev->of_node; } @@ -1237,17 +1228,6 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain, return ret; } -static int __arm_smmu_get_pci_sid(struct pci_dev *pdev, u16 alias, void *data) -{ - *((u16 *)data) = alias; - return 0; /* Continue walking */ -} - -static void __arm_smmu_release_pci_iommudata(void *data) -{ - kfree(data); -} - static int arm_smmu_add_device(struct device *dev) { struct arm_smmu_device *smmu; @@ -1266,24 +1246,7 @@ static int arm_smmu_add_device(struct device *dev) return PTR_ERR(group); } - if (dev_is_pci(dev)) { - struct pci_dev *pdev = to_pci_dev(dev); - - cfg = kzalloc(sizeof(*cfg), GFP_KERNEL); - if (!cfg) { - ret = -ENOMEM; - goto out_put_group; - } - - cfg->num_streamids = 1; - /* - * Assume Stream ID == Requester ID for now. - * We need a way to describe the ID mappings in FDT. - */ - pci_for_each_dma_alias(pdev, __arm_smmu_get_pci_sid, - &cfg->streamids[0]); - releasefn = __arm_smmu_release_pci_iommudata; - } else { + { struct arm_smmu_master *master; master = find_smmu_master(smmu, dev->of_node); @@ -1798,11 +1761,6 @@ static int __init arm_smmu_init(void) bus_set_iommu(&amba_bustype, &arm_smmu_ops); #endif -#ifdef CONFIG_PCI - if (!iommu_present(&pci_bus_type)) - bus_set_iommu(&pci_bus_type, &arm_smmu_ops); -#endif - return 0; } |