summaryrefslogtreecommitdiff
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2017-02-07 18:18:46 +0100
committerJoerg Roedel <jroedel@suse.de>2017-02-10 13:44:57 +0100
commitc73e1ac8b2bc6ab18d9f9a96b17ee7388b49a0c0 (patch)
treec21f8b876e5e420c5edad428b25827666b9ae5de /include/linux/iommu.h
parente3d10af1128b6bc394f21656ff13753130f3c107 (diff)
iommu: Add iommu_device_set_fwnode() interface
Allow to store a fwnode in 'struct iommu_device'; Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index bae3cfc8b4a3..626c935edee1 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -214,6 +214,7 @@ struct iommu_ops {
struct iommu_device {
struct list_head list;
const struct iommu_ops *ops;
+ struct fwnode_handle *fwnode;
struct device dev;
};
@@ -233,6 +234,12 @@ static inline void iommu_device_set_ops(struct iommu_device *iommu,
iommu->ops = ops;
}
+static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
+ struct fwnode_handle *fwnode)
+{
+ iommu->fwnode = fwnode;
+}
+
#define IOMMU_GROUP_NOTIFY_ADD_DEVICE 1 /* Device added */
#define IOMMU_GROUP_NOTIFY_DEL_DEVICE 2 /* Pre Device removed */
#define IOMMU_GROUP_NOTIFY_BIND_DRIVER 3 /* Pre Driver bind */
@@ -580,6 +587,11 @@ static inline void iommu_device_set_ops(struct iommu_device *iommu,
{
}
+static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
+ struct fwnode_handle *fwnode)
+{
+}
+
static inline void iommu_device_unregister(struct iommu_device *iommu)
{
}