4 #include <linux/iommu.h>
9 extern int of_get_dma_window(struct device_node *dn, const char *prefix,
10 int index, unsigned long *busno, dma_addr_t *addr,
13 extern void of_iommu_init(void);
17 static inline int of_get_dma_window(struct device_node *dn, const char *prefix,
18 int index, unsigned long *busno, dma_addr_t *addr,
24 static inline void of_iommu_init(void) { }
26 #endif /* CONFIG_OF_IOMMU */
28 static inline void of_iommu_set_ops(struct device_node *np,
29 const struct iommu_ops *ops)
31 np->data = (struct iommu_ops *)ops;
34 static inline struct iommu_ops *of_iommu_get_ops(struct device_node *np)
39 extern struct of_device_id __iommu_of_table;
41 typedef int (*of_iommu_init_fn)(struct device_node *);
43 #define IOMMU_OF_DECLARE(name, compat, fn) \
44 _OF_DECLARE(iommu, name, compat, fn, of_iommu_init_fn)
46 #endif /* __OF_IOMMU_H */