pci.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifdef CONFIG_PCI_MSI
  16. unsigned long *msi_map;
  17. unsigned int msi_base;
  18. unsigned int msi_count;
  19. unsigned int msi_next;
  20. unsigned int msi32_support;
  21. #endif
  22. int (*msi_setup)(struct pnv_phb *phb, struct pci_dev *dev,
  23. unsigned int hwirq, unsigned int is_64,
  24. struct msi_msg *msg);
  25. void (*dma_dev_setup)(struct pnv_phb *phb, struct pci_dev *pdev);
  26. void (*fixup_phb)(struct pci_controller *hose);
  27. u32 (*bdfn_to_pe)(struct pnv_phb *phb, struct pci_bus *bus, u32 devfn);
  28. union {
  29. struct {
  30. struct iommu_table iommu_table;
  31. } p5ioc2;
  32. };
  33. };
  34. extern struct pci_ops pnv_pci_ops;
  35. extern void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
  36. void *tce_mem, u64 tce_size,
  37. u64 dma_offset);
  38. extern void pnv_pci_init_p5ioc2_hub(struct device_node *np);
  39. #endif /* __POWERNV_PCI_H */