aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h8
-rw-r--r--arch/powerpc/platforms/pseries/eeh_dev.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 5d487657322e..21f99aec41b9 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -155,6 +155,7 @@ struct pci_dn {
155 155
156 struct pci_dev *pcidev; /* back-pointer to the pci device */ 156 struct pci_dev *pcidev; /* back-pointer to the pci device */
157#ifdef CONFIG_EEH 157#ifdef CONFIG_EEH
158 struct eeh_dev *edev; /* eeh device */
158 int class_code; /* pci device class */ 159 int class_code; /* pci device class */
159 int eeh_mode; /* See eeh.h for possible EEH_MODEs */ 160 int eeh_mode; /* See eeh.h for possible EEH_MODEs */
160 int eeh_config_addr; 161 int eeh_config_addr;
@@ -185,6 +186,13 @@ static inline int pci_device_from_OF_node(struct device_node *np,
185 return 0; 186 return 0;
186} 187}
187 188
189#if defined(CONFIG_EEH)
190static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
191{
192 return PCI_DN(dn)->edev;
193}
194#endif
195
188/** Find the bus corresponding to the indicated device node */ 196/** Find the bus corresponding to the indicated device node */
189extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn); 197extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
190 198
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
index f3aed7dcae95..c4507d095900 100644
--- a/arch/powerpc/platforms/pseries/eeh_dev.c
+++ b/arch/powerpc/platforms/pseries/eeh_dev.c
@@ -62,7 +62,7 @@ void * __devinit eeh_dev_init(struct device_node *dn, void *data)
62 } 62 }
63 63
64 /* Associate EEH device with OF node */ 64 /* Associate EEH device with OF node */
65 dn->edev = edev; 65 PCI_DN(dn)->edev = edev;
66 edev->dn = dn; 66 edev->dn = dn;
67 edev->phb = phb; 67 edev->phb = phb;
68 68