34 lines
671 B
C
Raw Normal View History

2026-01-21 18:59:54 +08:00
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __OF_IOMMU_H
#define __OF_IOMMU_H
2026-01-29 22:25:33 +08:00
struct device;
struct device_node;
struct iommu_ops;
2026-01-21 18:59:54 +08:00
#ifdef CONFIG_OF_IOMMU
2026-01-29 22:25:33 +08:00
extern int of_iommu_configure(struct device *dev, struct device_node *master_np,
const u32 *id);
2026-01-21 18:59:54 +08:00
2026-01-29 22:25:33 +08:00
extern void of_iommu_get_resv_regions(struct device *dev,
struct list_head *list);
2026-01-21 18:59:54 +08:00
#else
2026-01-29 22:25:33 +08:00
static inline int of_iommu_configure(struct device *dev,
struct device_node *master_np,
const u32 *id)
2026-01-21 18:59:54 +08:00
{
2026-01-29 22:25:33 +08:00
return -ENODEV;
2026-01-21 18:59:54 +08:00
}
2026-01-29 22:25:33 +08:00
static inline void of_iommu_get_resv_regions(struct device *dev,
struct list_head *list)
2026-01-21 18:59:54 +08:00
{
}
#endif /* CONFIG_OF_IOMMU */
#endif /* __OF_IOMMU_H */