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 | ||
6ff6e184 JG |
11 | extern int of_iommu_configure(struct device *dev, struct device_node *master_np, |
12 | const u32 *id); | |
1cd076bf | 13 | |
a5bf3cfc TR |
14 | extern void of_iommu_get_resv_regions(struct device *dev, |
15 | struct list_head *list); | |
16 | ||
4e0ee78f HD |
17 | #else |
18 | ||
6ff6e184 JG |
19 | static inline int of_iommu_configure(struct device *dev, |
20 | struct device_node *master_np, | |
21 | const u32 *id) | |
7eba1d51 | 22 | { |
6ff6e184 | 23 | return -ENODEV; |
7eba1d51 | 24 | } |
1cd076bf | 25 | |
a5bf3cfc TR |
26 | static inline void of_iommu_get_resv_regions(struct device *dev, |
27 | struct list_head *list) | |
28 | { | |
29 | } | |
30 | ||
4e0ee78f HD |
31 | #endif /* CONFIG_OF_IOMMU */ |
32 | ||
33 | #endif /* __OF_IOMMU_H */ |