[RFC 8/9] drivers: of: call iommu_bus_add_dev after iommu_configure_ops
Sricharan R
sricharan at codeaurora.org
Mon Apr 25 08:58:13 PDT 2016
Now that the device's iommu ops are configured at probe time,
the device has to be added to the iommu late.
Signed-off-by: Sricharan R <sricharan at codeaurora.org>
---
drivers/of/device.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 57a5f2d..722115c 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -6,6 +6,7 @@
#include <linux/of_iommu.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
+#include <linux/iommu.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/slab.h>
@@ -154,6 +155,9 @@ int of_dma_configure_ops(struct device *dev, struct device_node *np)
dev_dbg(dev, "device is%sbehind an iommu\n",
iommu ? " " : " not ");
+ if (iommu)
+ iommu_bus_add_dev(dev);
+
arch_setup_dma_ops(dev, dma_addr, size, iommu, coherent);
return 0;
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
More information about the linux-arm-kernel
mailing list