From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752727AbdBINsf (ORCPT ); Thu, 9 Feb 2017 08:48:35 -0500 Received: from 8bytes.org ([81.169.241.247]:52876 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751994AbdBINr6 (ORCPT ); Thu, 9 Feb 2017 08:47:58 -0500 From: Joerg Roedel To: Will Deacon , Robin Murphy , Lorenzo Pieralisi , Alex Williamson , David Woodhouse Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Date: Thu, 9 Feb 2017 12:32:55 +0100 Message-Id: <1486639981-32368-7-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486639981-32368-1-git-send-email-joro@8bytes.org> References: <1486639981-32368-1-git-send-email-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel Allow to store a fwnode in 'struct iommu_device'; Signed-off-by: Joerg Roedel --- 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