xref: /openbmc/linux/arch/powerpc/include/asm/device.h (revision e190bfe5)
1 /*
2  * Arch specific extensions to struct device
3  *
4  * This file is released under the GPLv2
5  */
6 #ifndef _ASM_POWERPC_DEVICE_H
7 #define _ASM_POWERPC_DEVICE_H
8 
9 struct dma_map_ops;
10 struct device_node;
11 
12 struct dev_archdata {
13 	/* DMA operations on that device */
14 	struct dma_map_ops	*dma_ops;
15 
16 	/*
17 	 * When an iommu is in use, dma_data is used as a ptr to the base of the
18 	 * iommu_table.  Otherwise, it is a simple numerical offset.
19 	 */
20 	union {
21 		dma_addr_t	dma_offset;
22 		void		*iommu_table_base;
23 	} dma_data;
24 
25 #ifdef CONFIG_SWIOTLB
26 	dma_addr_t		max_direct_dma_addr;
27 #endif
28 };
29 
30 struct pdev_archdata {
31 	u64 dma_mask;
32 };
33 
34 #endif /* _ASM_POWERPC_DEVICE_H */
35