]> git.karo-electronics.de Git - mv-sheeva.git/blob - arch/powerpc/platforms/powernv/pci.h
6730a10d7369ba7813941486832276a9e86655b4
[mv-sheeva.git] / arch / powerpc / platforms / powernv / pci.h
1 #ifndef __POWERNV_PCI_H
2 #define __POWERNV_PCI_H
3
4 struct pci_dn;
5
6 enum pnv_phb_type {
7         PNV_PHB_P5IOC2,
8         PNV_PHB_IODA1,
9         PNV_PHB_IODA2,
10 };
11
12 struct 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
30 extern struct pci_ops pnv_pci_ops;
31
32 extern void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
33                                       void *tce_mem, u64 tce_size,
34                                       u64 dma_offset);
35 extern void pnv_pci_init_p5ioc2_hub(struct device_node *np);
36
37
38 #endif /* __POWERNV_PCI_H */