summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/pci-bridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/pci-bridge.h')
-rw-r--r--include/asm-ppc64/pci-bridge.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h
index d899138..56863df 100644
--- a/include/asm-ppc64/pci-bridge.h
+++ b/include/asm-ppc64/pci-bridge.h
@@ -3,6 +3,9 @@
#define _ASM_PCI_BRIDGE_H
#include <linux/pci.h>
+#include <linux/list.h>
+
+#include <asm/iSeries/HvCallPci.h>
/*
* This program is free software; you can redistribute it and/or
@@ -71,6 +74,15 @@ struct pci_dn {
struct iommu_table *iommu_table; /* for phb's or bridges */
struct pci_dev *pcidev; /* back-pointer to the pci device */
struct device_node *node; /* back-pointer to the device_node */
+#ifdef CONFIG_PPC_ISERIES
+ struct list_head Device_List;
+ union HvDsaMap DsaAddr; /* Direct Select Address */
+ /* busNumber, subBusNumber, */
+ /* deviceId, barNumber */
+ int Irq; /* Assigned IRQ */
+ int Flags; /* Possible flags(disable/bist)*/
+ u8 LogicalSlot; /* Hv Slot Index for Tces */
+#endif
u32 config_space[16]; /* saved PCI config space */
};
@@ -96,6 +108,16 @@ static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev)
return fetch_dev_dn(dev);
}
+static inline int pci_device_from_OF_node(struct device_node *np,
+ u8 *bus, u8 *devfn)
+{
+ if (!PCI_DN(np))
+ return -ENODEV;
+ *bus = PCI_DN(np)->busno;
+ *devfn = PCI_DN(np)->devfn;
+ return 0;
+}
+
static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
{
if (bus->self)
OpenPOWER on IntegriCloud