2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2012-06-25 14:23:54 +03:00
|
|
|
#ifndef __OF_IOMMU_H
|
|
|
|
|
#define __OF_IOMMU_H
|
|
|
|
|
|
2021-05-27 14:37:09 -05:00
|
|
|
struct device;
|
|
|
|
|
struct device_node;
|
|
|
|
|
struct iommu_ops;
|
2014-08-27 14:40:58 +01:00
|
|
|
|
2012-06-25 14:23:54 +03:00
|
|
|
#ifdef CONFIG_OF_IOMMU
|
|
|
|
|
|
2023-12-07 14:03:09 -04:00
|
|
|
extern int of_iommu_configure(struct device *dev, struct device_node *master_np,
|
|
|
|
|
const u32 *id);
|
2014-08-27 14:40:58 +01:00
|
|
|
|
2023-01-20 18:42:50 +01:00
|
|
|
extern void of_iommu_get_resv_regions(struct device *dev,
|
|
|
|
|
struct list_head *list);
|
|
|
|
|
|
2012-06-25 14:23:54 +03:00
|
|
|
#else
|
|
|
|
|
|
2023-12-07 14:03:09 -04:00
|
|
|
static inline int of_iommu_configure(struct device *dev,
|
|
|
|
|
struct device_node *master_np,
|
|
|
|
|
const u32 *id)
|
2014-08-27 16:20:32 +01:00
|
|
|
{
|
2023-12-07 14:03:09 -04:00
|
|
|
return -ENODEV;
|
2014-08-27 16:20:32 +01:00
|
|
|
}
|
2014-08-27 14:40:58 +01:00
|
|
|
|
2023-01-20 18:42:50 +01:00
|
|
|
static inline void of_iommu_get_resv_regions(struct device *dev,
|
|
|
|
|
struct list_head *list)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-25 14:23:54 +03:00
|
|
|
#endif /* CONFIG_OF_IOMMU */
|
|
|
|
|
|
|
|
|
|
#endif /* __OF_IOMMU_H */
|