8 * init() - Connect a device to it's IOMMU, called before probe()
9 * The iommu device can be fetched through dev->iommu
11 * @iommu_dev: IOMMU device
12 * @dev: Device to connect
13 * @return 0 if OK, -errno on error
15 int (*connect)(struct udevice *dev);
17 * map() - map DMA memory
19 * @dev: device for which to map DMA memory
20 * @addr: CPU address of the memory
21 * @size: size of the memory
22 * @return DMA address for the device
24 dma_addr_t (*map)(struct udevice *dev, void *addr, size_t size);
27 * unmap() - unmap DMA memory
29 * @dev: device for which to unmap DMA memory
30 * @addr: DMA address of the memory
31 * @size: size of the memory
33 void (*unmap)(struct udevice *dev, dma_addr_t addr, size_t size);
36 #if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \
37 CONFIG_IS_ENABLED(IOMMU)
38 int dev_iommu_enable(struct udevice *dev);
40 static inline int dev_iommu_enable(struct udevice *dev)
46 dma_addr_t dev_iommu_dma_map(struct udevice *dev, void *addr, size_t size);
47 void dev_iommu_dma_unmap(struct udevice *dev, dma_addr_t addr, size_t size);