Skip to content

Commit

Permalink
iommu: Add iommu_device_set_fwnode() interface
Browse files Browse the repository at this point in the history
Allow to store a fwnode in 'struct iommu_device';

Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Joerg Roedel committed Feb 10, 2017
1 parent e3d10af commit c73e1ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/linux/iommu.h
Original file line number Diff line number Diff line change
@@ -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)
{
}

0 comments on commit c73e1ac

Please sign in to comment.