Commit | Line | Data |
---|---|---|
c6dbaef2 BH |
1 | /* |
2 | * Arch specific extensions to struct device | |
3 | * | |
4 | * This file is released under the GPLv2 | |
5 | */ | |
12d04eef BH |
6 | #ifndef _ASM_POWERPC_DEVICE_H |
7 | #define _ASM_POWERPC_DEVICE_H | |
c6dbaef2 | 8 | |
12d04eef | 9 | struct device_node; |
cca87d30 GS |
10 | #ifdef CONFIG_PPC64 |
11 | struct pci_dn; | |
2db4928b | 12 | struct iommu_table; |
cca87d30 | 13 | #endif |
12d04eef | 14 | |
f6aedd86 NA |
15 | /* |
16 | * Arch extensions to struct device. | |
17 | * | |
18 | * When adding fields, consider macio_add_one_device in | |
19 | * drivers/macintosh/macio_asic.c | |
20 | */ | |
12d04eef | 21 | struct dev_archdata { |
738ef42e | 22 | /* |
2db4928b BH |
23 | * These two used to be a union. However, with the hybrid ops we need |
24 | * both so here we store both a DMA offset for direct mappings and | |
25 | * an iommu_table for remapped DMA. | |
738ef42e | 26 | */ |
2db4928b BH |
27 | dma_addr_t dma_offset; |
28 | ||
29 | #ifdef CONFIG_PPC64 | |
30 | struct iommu_table *iommu_table_base; | |
31 | #endif | |
738ef42e | 32 | |
bb917505 VS |
33 | #ifdef CONFIG_IOMMU_API |
34 | void *iommu_domain; | |
35 | #endif | |
762afb73 FT |
36 | #ifdef CONFIG_SWIOTLB |
37 | dma_addr_t max_direct_dma_addr; | |
38 | #endif | |
cca87d30 GS |
39 | #ifdef CONFIG_PPC64 |
40 | struct pci_dn *pci_data; | |
41 | #endif | |
eb740b5f GS |
42 | #ifdef CONFIG_EEH |
43 | struct eeh_dev *edev; | |
44 | #endif | |
d6b9a81b AB |
45 | #ifdef CONFIG_FAIL_IOMMU |
46 | int fail_iommu; | |
47 | #endif | |
f46580a5 MN |
48 | #ifdef CONFIG_CXL_BASE |
49 | struct cxl_context *cxl_ctx; | |
50 | #endif | |
12d04eef BH |
51 | }; |
52 | ||
d7aacadd | 53 | struct pdev_archdata { |
cb6dc512 | 54 | u64 dma_mask; |
d7aacadd MD |
55 | }; |
56 | ||
d24f9c69 MM |
57 | #define ARCH_HAS_DMA_GET_REQUIRED_MASK |
58 | ||
12d04eef | 59 | #endif /* _ASM_POWERPC_DEVICE_H */ |