blob: 55c1eb300a86bb5af06b709be5b522db8ee1d9f1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Hiroshi Doyu4e0ee782012-06-25 14:23:54 +03002#ifndef __OF_IOMMU_H
3#define __OF_IOMMU_H
4
Rob Herringbb6bfd792021-05-27 14:37:09 -05005struct device;
6struct device_node;
7struct iommu_ops;
Will Deacon1cd076b2014-08-27 14:40:58 +01008
Hiroshi Doyu4e0ee782012-06-25 14:23:54 +03009#ifdef CONFIG_OF_IOMMU
10
Robin Murphy53c92d72016-04-07 18:42:05 +010011extern const struct iommu_ops *of_iommu_configure(struct device *dev,
Lorenzo Pieralisia081bd42020-06-19 09:20:08 +010012 struct device_node *master_np,
13 const u32 *id);
Will Deacon1cd076b2014-08-27 14:40:58 +010014
Hiroshi Doyu4e0ee782012-06-25 14:23:54 +030015#else
16
Robin Murphy53c92d72016-04-07 18:42:05 +010017static inline const struct iommu_ops *of_iommu_configure(struct device *dev,
Lorenzo Pieralisia081bd42020-06-19 09:20:08 +010018 struct device_node *master_np,
19 const u32 *id)
Will Deacon7eba1d52014-08-27 16:20:32 +010020{
21 return NULL;
22}
Will Deacon1cd076b2014-08-27 14:40:58 +010023
Hiroshi Doyu4e0ee782012-06-25 14:23:54 +030024#endif /* CONFIG_OF_IOMMU */
25
Hiroshi Doyu4e0ee782012-06-25 14:23:54 +030026#endif /* __OF_IOMMU_H */