pci.h 790 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __POWERNV_PCI_H
  2. #define __POWERNV_PCI_H
  3. struct pci_dn;
  4. enum pnv_phb_type {
  5. PNV_PHB_P5IOC2,
  6. PNV_PHB_IODA1,
  7. PNV_PHB_IODA2,
  8. };
  9. struct pnv_phb {
  10. struct pci_controller *hose;
  11. enum pnv_phb_type type;
  12. u64 opal_id;
  13. void __iomem *regs;
  14. spinlock_t lock;
  15. void (*dma_dev_setup)(struct pnv_phb *phb, struct pci_dev *pdev);
  16. void (*fixup_phb)(struct pci_controller *hose);
  17. u32 (*bdfn_to_pe)(struct pnv_phb *phb, struct pci_bus *bus, u32 devfn);
  18. union {
  19. struct {
  20. struct iommu_table iommu_table;
  21. } p5ioc2;
  22. };
  23. };
  24. extern struct pci_ops pnv_pci_ops;
  25. extern void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
  26. void *tce_mem, u64 tce_size,
  27. u64 dma_offset);
  28. extern void pnv_pci_init_p5ioc2_hub(struct device_node *np);
  29. #endif /* __POWERNV_PCI_H */