diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:30 +0000 |
commit | 76cb841cb886eef6b3bee341a2266c76578724ad (patch) | |
tree | f5892e5ba6cc11949952a6ce4ecbe6d516d6ce58 /arch/powerpc/include/asm/device.h | |
parent | Initial commit. (diff) | |
download | linux-c109f8d9e922037b3fa45f46d78384d49db8ad76.tar.xz linux-c109f8d9e922037b3fa45f46d78384d49db8ad76.zip |
Adding upstream version 4.19.249.upstream/4.19.249upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'arch/powerpc/include/asm/device.h')
-rw-r--r-- | arch/powerpc/include/asm/device.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h new file mode 100644 index 000000000..0245bfcaa --- /dev/null +++ b/arch/powerpc/include/asm/device.h @@ -0,0 +1,59 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + */ +#ifndef _ASM_POWERPC_DEVICE_H +#define _ASM_POWERPC_DEVICE_H + +struct device_node; +#ifdef CONFIG_PPC64 +struct pci_dn; +struct iommu_table; +#endif + +/* + * Arch extensions to struct device. + * + * When adding fields, consider macio_add_one_device in + * drivers/macintosh/macio_asic.c + */ +struct dev_archdata { + /* + * These two used to be a union. However, with the hybrid ops we need + * both so here we store both a DMA offset for direct mappings and + * an iommu_table for remapped DMA. + */ + dma_addr_t dma_offset; + +#ifdef CONFIG_PPC64 + struct iommu_table *iommu_table_base; +#endif + +#ifdef CONFIG_IOMMU_API + void *iommu_domain; +#endif +#ifdef CONFIG_SWIOTLB + dma_addr_t max_direct_dma_addr; +#endif +#ifdef CONFIG_PPC64 + struct pci_dn *pci_data; +#endif +#ifdef CONFIG_EEH + struct eeh_dev *edev; +#endif +#ifdef CONFIG_FAIL_IOMMU + int fail_iommu; +#endif +#ifdef CONFIG_CXL_BASE + struct cxl_context *cxl_ctx; +#endif +}; + +struct pdev_archdata { + u64 dma_mask; +}; + +#define ARCH_HAS_DMA_GET_REQUIRED_MASK + +#endif /* _ASM_POWERPC_DEVICE_H */ |