of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / arch / powerpc / include / asm / device.h
blob406c2b1ff82d67fd0465163ce05cfd76961456bb
1 /*
2 * Arch specific extensions to struct device
4 * This file is released under the GPLv2
5 */
6 #ifndef _ASM_POWERPC_DEVICE_H
7 #define _ASM_POWERPC_DEVICE_H
9 struct dma_map_ops;
10 struct device_node;
11 #ifdef CONFIG_PPC64
12 struct pci_dn;
13 struct iommu_table;
14 #endif
17 * Arch extensions to struct device.
19 * When adding fields, consider macio_add_one_device in
20 * drivers/macintosh/macio_asic.c
22 struct dev_archdata {
23 /* DMA operations on that device */
24 struct dma_map_ops *dma_ops;
27 * These two used to be a union. However, with the hybrid ops we need
28 * both so here we store both a DMA offset for direct mappings and
29 * an iommu_table for remapped DMA.
31 dma_addr_t dma_offset;
33 #ifdef CONFIG_PPC64
34 struct iommu_table *iommu_table_base;
35 #endif
37 #ifdef CONFIG_IOMMU_API
38 void *iommu_domain;
39 #endif
40 #ifdef CONFIG_SWIOTLB
41 dma_addr_t max_direct_dma_addr;
42 #endif
43 #ifdef CONFIG_PPC64
44 struct pci_dn *pci_data;
45 #endif
46 #ifdef CONFIG_EEH
47 struct eeh_dev *edev;
48 #endif
49 #ifdef CONFIG_FAIL_IOMMU
50 int fail_iommu;
51 #endif
52 #ifdef CONFIG_CXL_BASE
53 struct cxl_context *cxl_ctx;
54 #endif
57 struct pdev_archdata {
58 u64 dma_mask;
61 #define ARCH_HAS_DMA_GET_REQUIRED_MASK
63 #endif /* _ASM_POWERPC_DEVICE_H */