xref: /openbmc/linux/arch/arm/include/asm/device.h (revision 54a611b6)
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_ARM_DMA_USE_IOMMU
10 	struct dma_iommu_mapping	*mapping;
11 #endif
12 	unsigned int dma_coherent:1;
13 	unsigned int dma_ops_setup:1;
14 };
15 
16 struct omap_device;
17 
18 struct pdev_archdata {
19 #ifdef CONFIG_ARCH_OMAP
20 	struct omap_device *od;
21 #endif
22 };
23 
24 #ifdef CONFIG_ARM_DMA_USE_IOMMU
25 #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
26 #else
27 #define to_dma_iommu_mapping(dev) NULL
28 #endif
29 
30 #endif
31