Linux 4.13.16
[linux/fpc-iii.git] / arch / powerpc / include / asm / device.h
blob0245bfcaac324c4ed0f42af59f8c25ab486a2b5e
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 device_node;
10 #ifdef CONFIG_PPC64
11 struct pci_dn;
12 struct iommu_table;
13 #endif
16 * Arch extensions to struct device.
18 * When adding fields, consider macio_add_one_device in
19 * drivers/macintosh/macio_asic.c
21 struct dev_archdata {
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.
27 dma_addr_t dma_offset;
29 #ifdef CONFIG_PPC64
30 struct iommu_table *iommu_table_base;
31 #endif
33 #ifdef CONFIG_IOMMU_API
34 void *iommu_domain;
35 #endif
36 #ifdef CONFIG_SWIOTLB
37 dma_addr_t max_direct_dma_addr;
38 #endif
39 #ifdef CONFIG_PPC64
40 struct pci_dn *pci_data;
41 #endif
42 #ifdef CONFIG_EEH
43 struct eeh_dev *edev;
44 #endif
45 #ifdef CONFIG_FAIL_IOMMU
46 int fail_iommu;
47 #endif
48 #ifdef CONFIG_CXL_BASE
49 struct cxl_context *cxl_ctx;
50 #endif
53 struct pdev_archdata {
54 u64 dma_mask;
57 #define ARCH_HAS_DMA_GET_REQUIRED_MASK
59 #endif /* _ASM_POWERPC_DEVICE_H */