1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef __OF_IOMMU_H |
3 | #define __OF_IOMMU_H |
4 | |
5 | struct device; |
6 | struct device_node; |
7 | struct iommu_ops; |
8 | |
9 | #ifdef CONFIG_OF_IOMMU |
10 | |
11 | extern int of_iommu_configure(struct device *dev, struct device_node *master_np, |
12 | const u32 *id); |
13 | |
14 | extern void of_iommu_get_resv_regions(struct device *dev, |
15 | struct list_head *list); |
16 | |
17 | #else |
18 | |
19 | static inline int of_iommu_configure(struct device *dev, |
20 | struct device_node *master_np, |
21 | const u32 *id) |
22 | { |
23 | return -ENODEV; |
24 | } |
25 | |
26 | static inline void of_iommu_get_resv_regions(struct device *dev, |
27 | struct list_head *list) |
28 | { |
29 | } |
30 | |
31 | #endif /* CONFIG_OF_IOMMU */ |
32 | |
33 | #endif /* __OF_IOMMU_H */ |
34 | |