Linux 6.16-rc6
[linux-block.git] / arch / powerpc / include / asm / device.h
CommitLineData
55716d26 1/* SPDX-License-Identifier: GPL-2.0-only */
c6dbaef2
BH
2/*
3 * Arch specific extensions to struct device
c6dbaef2 4 */
12d04eef
BH
5#ifndef _ASM_POWERPC_DEVICE_H
6#define _ASM_POWERPC_DEVICE_H
c6dbaef2 7
12d04eef 8struct device_node;
cca87d30
GS
9#ifdef CONFIG_PPC64
10struct pci_dn;
2db4928b 11struct iommu_table;
cca87d30 12#endif
12d04eef 13
f6aedd86
NA
14/*
15 * Arch extensions to struct device.
16 *
17 * When adding fields, consider macio_add_one_device in
18 * drivers/macintosh/macio_asic.c
19 */
12d04eef 20struct dev_archdata {
738ef42e 21 /*
2db4928b
BH
22 * These two used to be a union. However, with the hybrid ops we need
23 * both so here we store both a DMA offset for direct mappings and
24 * an iommu_table for remapped DMA.
738ef42e 25 */
2db4928b
BH
26 dma_addr_t dma_offset;
27
28#ifdef CONFIG_PPC64
29 struct iommu_table *iommu_table_base;
30#endif
738ef42e 31
cca87d30
GS
32#ifdef CONFIG_PPC64
33 struct pci_dn *pci_data;
34#endif
eb740b5f
GS
35#ifdef CONFIG_EEH
36 struct eeh_dev *edev;
37#endif
d6b9a81b
AB
38#ifdef CONFIG_FAIL_IOMMU
39 int fail_iommu;
40#endif
37b59ef0
OH
41#ifdef CONFIG_PCI_IOV
42 void *iov_data;
43#endif
12d04eef
BH
44};
45
d7aacadd 46struct pdev_archdata {
cb6dc512 47 u64 dma_mask;
4c08d4bb
KJ
48 /*
49 * Pointer to nvdimm_pmu structure, to handle the unregistering
50 * of pmu device
51 */
52 void *priv;
d7aacadd
MD
53};
54
12d04eef 55#endif /* _ASM_POWERPC_DEVICE_H */