Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Hiroshi Doyu | 4e0ee78 | 2012-06-25 14:23:54 +0300 | [diff] [blame] | 2 | #ifndef __OF_IOMMU_H |
3 | #define __OF_IOMMU_H | ||||
4 | |||||
Rob Herring | bb6bfd79 | 2021-05-27 14:37:09 -0500 | [diff] [blame] | 5 | struct device; |
6 | struct device_node; | ||||
7 | struct iommu_ops; | ||||
Will Deacon | 1cd076b | 2014-08-27 14:40:58 +0100 | [diff] [blame] | 8 | |
Hiroshi Doyu | 4e0ee78 | 2012-06-25 14:23:54 +0300 | [diff] [blame] | 9 | #ifdef CONFIG_OF_IOMMU |
10 | |||||
Robin Murphy | 53c92d7 | 2016-04-07 18:42:05 +0100 | [diff] [blame] | 11 | extern const struct iommu_ops *of_iommu_configure(struct device *dev, |
Lorenzo Pieralisi | a081bd4 | 2020-06-19 09:20:08 +0100 | [diff] [blame] | 12 | struct device_node *master_np, |
13 | const u32 *id); | ||||
Will Deacon | 1cd076b | 2014-08-27 14:40:58 +0100 | [diff] [blame] | 14 | |
Hiroshi Doyu | 4e0ee78 | 2012-06-25 14:23:54 +0300 | [diff] [blame] | 15 | #else |
16 | |||||
Robin Murphy | 53c92d7 | 2016-04-07 18:42:05 +0100 | [diff] [blame] | 17 | static inline const struct iommu_ops *of_iommu_configure(struct device *dev, |
Lorenzo Pieralisi | a081bd4 | 2020-06-19 09:20:08 +0100 | [diff] [blame] | 18 | struct device_node *master_np, |
19 | const u32 *id) | ||||
Will Deacon | 7eba1d5 | 2014-08-27 16:20:32 +0100 | [diff] [blame] | 20 | { |
21 | return NULL; | ||||
22 | } | ||||
Will Deacon | 1cd076b | 2014-08-27 14:40:58 +0100 | [diff] [blame] | 23 | |
Hiroshi Doyu | 4e0ee78 | 2012-06-25 14:23:54 +0300 | [diff] [blame] | 24 | #endif /* CONFIG_OF_IOMMU */ |
25 | |||||
Hiroshi Doyu | 4e0ee78 | 2012-06-25 14:23:54 +0300 | [diff] [blame] | 26 | #endif /* __OF_IOMMU_H */ |