Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
4e0ee78f HD |
2 | #ifndef __OF_IOMMU_H |
3 | #define __OF_IOMMU_H | |
4 | ||
bb6bfd79 RH |
5 | struct device; |
6 | struct device_node; | |
7 | struct iommu_ops; | |
1cd076bf | 8 | |
4e0ee78f HD |
9 | #ifdef CONFIG_OF_IOMMU |
10 | ||
53c92d79 | 11 | extern const struct iommu_ops *of_iommu_configure(struct device *dev, |
a081bd4a LP |
12 | struct device_node *master_np, |
13 | const u32 *id); | |
1cd076bf | 14 | |
a5bf3cfc TR |
15 | extern void of_iommu_get_resv_regions(struct device *dev, |
16 | struct list_head *list); | |
17 | ||
4e0ee78f HD |
18 | #else |
19 | ||
53c92d79 | 20 | static inline const struct iommu_ops *of_iommu_configure(struct device *dev, |
a081bd4a LP |
21 | struct device_node *master_np, |
22 | const u32 *id) | |
7eba1d51 WD |
23 | { |
24 | return NULL; | |
25 | } | |
1cd076bf | 26 | |
a5bf3cfc TR |
27 | static inline void of_iommu_get_resv_regions(struct device *dev, |
28 | struct list_head *list) | |
29 | { | |
30 | } | |
31 | ||
4e0ee78f HD |
32 | #endif /* CONFIG_OF_IOMMU */ |
33 | ||
34 | #endif /* __OF_IOMMU_H */ |