Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Arch specific extensions to struct device
0004  */
0005 #ifndef _ASM_POWERPC_DEVICE_H
0006 #define _ASM_POWERPC_DEVICE_H
0007 
0008 struct device_node;
0009 #ifdef CONFIG_PPC64
0010 struct pci_dn;
0011 struct iommu_table;
0012 #endif
0013 
0014 /*
0015  * Arch extensions to struct device.
0016  *
0017  * When adding fields, consider macio_add_one_device in
0018  * drivers/macintosh/macio_asic.c
0019  */
0020 struct dev_archdata {
0021     /*
0022      * These two used to be a union. However, with the hybrid ops we need
0023      * both so here we store both a DMA offset for direct mappings and
0024      * an iommu_table for remapped DMA.
0025      */
0026     dma_addr_t      dma_offset;
0027 
0028 #ifdef CONFIG_PPC64
0029     struct iommu_table  *iommu_table_base;
0030 #endif
0031 
0032 #ifdef CONFIG_PPC64
0033     struct pci_dn       *pci_data;
0034 #endif
0035 #ifdef CONFIG_EEH
0036     struct eeh_dev      *edev;
0037 #endif
0038 #ifdef CONFIG_FAIL_IOMMU
0039     int fail_iommu;
0040 #endif
0041 #ifdef CONFIG_CXL_BASE
0042     struct cxl_context  *cxl_ctx;
0043 #endif
0044 #ifdef CONFIG_PCI_IOV
0045     void *iov_data;
0046 #endif
0047 };
0048 
0049 struct pdev_archdata {
0050     u64 dma_mask;
0051     /*
0052      * Pointer to nvdimm_pmu structure, to handle the unregistering
0053      * of pmu device
0054      */
0055     void *priv;
0056 };
0057 
0058 #endif /* _ASM_POWERPC_DEVICE_H */