blob: 6730a10d7369ba7813941486832276a9e86655b4 [file] [log] [blame]
Benjamin Herrenschmidt61305a92011-09-19 17:45:05 +00001#ifndef __POWERNV_PCI_H
2#define __POWERNV_PCI_H
3
4struct pci_dn;
5
6enum pnv_phb_type {
7 PNV_PHB_P5IOC2,
8 PNV_PHB_IODA1,
9 PNV_PHB_IODA2,
10};
11
12struct pnv_phb {
13 struct pci_controller *hose;
14 enum pnv_phb_type type;
15 u64 opal_id;
16 void __iomem *regs;
17 spinlock_t lock;
18
19 void (*dma_dev_setup)(struct pnv_phb *phb, struct pci_dev *pdev);
20 void (*fixup_phb)(struct pci_controller *hose);
21 u32 (*bdfn_to_pe)(struct pnv_phb *phb, struct pci_bus *bus, u32 devfn);
22
23 union {
24 struct {
25 struct iommu_table iommu_table;
26 } p5ioc2;
27 };
28};
29
30extern struct pci_ops pnv_pci_ops;
31
32extern void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
33 void *tce_mem, u64 tce_size,
34 u64 dma_offset);
35extern void pnv_pci_init_p5ioc2_hub(struct device_node *np);
36
37
38#endif /* __POWERNV_PCI_H */