xref: /openbmc/linux/arch/arm/include/asm/device.h (revision 113094f7)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Arch specific extensions to struct device
4  */
5 #ifndef ASMARM_DEVICE_H
6 #define ASMARM_DEVICE_H
7 
8 struct dev_archdata {
9 #ifdef CONFIG_DMABOUNCE
10 	struct dmabounce_device_info *dmabounce;
11 #endif
12 #ifdef CONFIG_IOMMU_API
13 	void *iommu; /* private IOMMU data */
14 #endif
15 #ifdef CONFIG_ARM_DMA_USE_IOMMU
16 	struct dma_iommu_mapping	*mapping;
17 #endif
18 #ifdef CONFIG_XEN
19 	const struct dma_map_ops *dev_dma_ops;
20 #endif
21 	unsigned int dma_coherent:1;
22 	unsigned int dma_ops_setup:1;
23 };
24 
25 struct omap_device;
26 
27 struct pdev_archdata {
28 #ifdef CONFIG_ARCH_OMAP
29 	struct omap_device *od;
30 #endif
31 };
32 
33 #ifdef CONFIG_ARM_DMA_USE_IOMMU
34 #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
35 #else
36 #define to_dma_iommu_mapping(dev) NULL
37 #endif
38 
39 #endif
40