lkml.org 
[lkml]   [2017]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface
Date
From: Joerg Roedel <jroedel@suse.de>

Allow to store a fwnode in 'struct iommu_device';

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
include/linux/iommu.h | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index bae3cfc..626c935 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)
{
}
--
1.9.1
\
 
 \ /
  Last update: 2017-02-09 14:49    [W:0.104 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site