of_iommu.h 703 B

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