diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2015-11-19 13:01:56 +0300 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2015-11-19 13:01:56 +0300 |
commit | 4b131c9bf8af9bc7a25441251f60a8ca7fc69c07 (patch) | |
tree | ba0bc4861f2f606b088b09c53389f06e88a69894 /arch/arm64/include/asm/dma-iommu.h | |
parent | d4e209db57abe07163fe84b43b533a4b6246b0c3 (diff) | |
parent | 08fad54a88981323247c7199ccbb8d42c596466a (diff) |
Automatically merging tracking-integration-linux-qcomlt into merge-linux-linaroHEADll-20151119.0linux-linaro-4.3-2015.11ll_20151119.0linux-linaro
Conflicting files:
Diffstat (limited to 'arch/arm64/include/asm/dma-iommu.h')
-rw-r--r-- | arch/arm64/include/asm/dma-iommu.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/dma-iommu.h b/arch/arm64/include/asm/dma-iommu.h new file mode 100644 index 000000000000..a8c56acc8c98 --- /dev/null +++ b/arch/arm64/include/asm/dma-iommu.h @@ -0,0 +1,36 @@ +#ifndef ASMARM_DMA_IOMMU_H +#define ASMARM_DMA_IOMMU_H + +#ifdef __KERNEL__ + +#include <linux/mm_types.h> +#include <linux/scatterlist.h> +#include <linux/dma-debug.h> +#include <linux/kmemcheck.h> +#include <linux/kref.h> + +struct dma_iommu_mapping { + /* iommu specific data */ + struct iommu_domain *domain; + + void *bitmap; + size_t bits; + unsigned int order; + dma_addr_t base; + + spinlock_t lock; + struct kref kref; +}; + +struct dma_iommu_mapping * +arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size, + int order); + +void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping); + +int arm_iommu_attach_device(struct device *dev, + struct dma_iommu_mapping *mapping); +void arm_iommu_detach_device(struct device *dev); + +#endif /* __KERNEL__ */ +#endif |