Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
9struct dma_map_ops;
10struct device_node;
11#ifdef CONFIG_PPC64
12struct pci_dn;
13#endif
14
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 */
21struct dev_archdata {
22 /* DMA operations on that device */
23 struct dma_map_ops *dma_ops;
24
25 /*
26 * When an iommu is in use, dma_data is used as a ptr to the base of the
27 * iommu_table. Otherwise, it is a simple numerical offset.
28 */
29 union {
30 dma_addr_t dma_offset;
31 void *iommu_table_base;
32 } dma_data;
33
34#ifdef CONFIG_IOMMU_API
35 void *iommu_domain;
36#endif
37#ifdef CONFIG_SWIOTLB
38 dma_addr_t max_direct_dma_addr;
39#endif
40#ifdef CONFIG_PPC64
41 struct pci_dn *pci_data;
42#endif
43#ifdef CONFIG_EEH
44 struct eeh_dev *edev;
45#endif
46#ifdef CONFIG_FAIL_IOMMU
47 int fail_iommu;
48#endif
49#ifdef CONFIG_CXL_BASE
50 struct cxl_context *cxl_ctx;
51#endif
52};
53
54struct pdev_archdata {
55 u64 dma_mask;
56};
57
58#define ARCH_HAS_DMA_GET_REQUIRED_MASK
59
60#endif /* _ASM_POWERPC_DEVICE_H */