Merge tag 'iommu-config-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / include / linux / iommu.h
index b29a598..38daa45 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <linux/errno.h>
 #include <linux/err.h>
+#include <linux/of.h>
 #include <linux/types.h>
 #include <linux/scatterlist.h>
 #include <trace/events/iommu.h>
@@ -28,7 +29,7 @@
 #define IOMMU_READ     (1 << 0)
 #define IOMMU_WRITE    (1 << 1)
 #define IOMMU_CACHE    (1 << 2) /* DMA cache coherency */
-#define IOMMU_EXEC     (1 << 3)
+#define IOMMU_NOEXEC   (1 << 3)
 
 struct iommu_ops;
 struct iommu_group;
@@ -62,6 +63,7 @@ enum iommu_cap {
        IOMMU_CAP_CACHE_COHERENCY,      /* IOMMU can enforce cache coherent DMA
                                           transactions */
        IOMMU_CAP_INTR_REMAP,           /* IOMMU supports interrupt isolation */
+       IOMMU_CAP_NOEXEC,               /* IOMMU_NOEXEC flag */
 };
 
 /*
@@ -105,7 +107,9 @@ enum iommu_attr {
  * @remove_device: remove device from iommu grouping
  * @domain_get_attr: Query domain attributes
  * @domain_set_attr: Change domain attributes
+ * @of_xlate: add OF master IDs to iommu grouping
  * @pgsize_bitmap: bitmap of supported page sizes
+ * @priv: per-instance data private to the iommu driver
  */
 struct iommu_ops {
        bool (*capable)(enum iommu_cap);
@@ -137,7 +141,12 @@ struct iommu_ops {
        /* Get the numer of window per domain */
        u32 (*domain_get_windows)(struct iommu_domain *domain);
 
+#ifdef CONFIG_OF_IOMMU
+       int (*of_xlate)(struct device *dev, struct of_phandle_args *args);
+#endif
+
        unsigned long pgsize_bitmap;
+       void *priv;
 };
 
 #define IOMMU_GROUP_NOTIFY_ADD_DEVICE          1 /* Device added */