1 /* Public domain. */ 2 3 #ifndef _LINUX_IOMMU_H 4 #define _LINUX_IOMMU_H 5 6 struct bus_type; 7 struct sg_table; 8 9 struct iommu_domain { 10 bus_dma_tag_t dmat; 11 }; 12 13 #define IOMMU_READ 0x0001 14 #define IOMMU_WRITE 0x0002 15 16 size_t iommu_map_sgtable(struct iommu_domain *, u_long, 17 struct sg_table *, int); 18 size_t iommu_unmap(struct iommu_domain *, u_long, size_t); 19 20 21 struct iommu_domain *iommu_get_domain_for_dev(struct device *); 22 phys_addr_t iommu_iova_to_phys(struct iommu_domain *, dma_addr_t); 23 24 struct iommu_domain *iommu_domain_alloc(struct bus_type *); 25 #define iommu_domain_free(a) 26 int iommu_attach_device(struct iommu_domain *, struct device *); 27 #define iommu_detach_device(a, b) 28 29 #endif 30