aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_dn.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci_dn.c')
-rw-r--r--arch/powerpc/kernel/pci_dn.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 68df018dae0e..d7d36df9c053 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -40,7 +40,8 @@
40static void * __devinit update_dn_pci_info(struct device_node *dn, void *data) 40static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
41{ 41{
42 struct pci_controller *phb = data; 42 struct pci_controller *phb = data;
43 const int *type = get_property(dn, "ibm,pci-config-space-type", NULL); 43 const int *type =
44 of_get_property(dn, "ibm,pci-config-space-type", NULL);
44 const u32 *regs; 45 const u32 *regs;
45 struct pci_dn *pdn; 46 struct pci_dn *pdn;
46 47
@@ -54,14 +55,14 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
54 dn->data = pdn; 55 dn->data = pdn;
55 pdn->node = dn; 56 pdn->node = dn;
56 pdn->phb = phb; 57 pdn->phb = phb;
57 regs = get_property(dn, "reg", NULL); 58 regs = of_get_property(dn, "reg", NULL);
58 if (regs) { 59 if (regs) {
59 /* First register entry is addr (00BBSS00) */ 60 /* First register entry is addr (00BBSS00) */
60 pdn->busno = (regs[0] >> 16) & 0xff; 61 pdn->busno = (regs[0] >> 16) & 0xff;
61 pdn->devfn = (regs[0] >> 8) & 0xff; 62 pdn->devfn = (regs[0] >> 8) & 0xff;
62 } 63 }
63 if (firmware_has_feature(FW_FEATURE_ISERIES)) { 64 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
64 const u32 *busp = get_property(dn, "linux,subbus", NULL); 65 const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
65 if (busp) 66 if (busp)
66 pdn->bussubno = *busp; 67 pdn->bussubno = *busp;
67 } 68 }
@@ -100,7 +101,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
100 u32 class; 101 u32 class;
101 102
102 nextdn = NULL; 103 nextdn = NULL;
103 classp = get_property(dn, "class-code", NULL); 104 classp = of_get_property(dn, "class-code", NULL);
104 class = classp ? *classp : 0; 105 class = classp ? *classp : 0;
105 106
106 if (pre && ((ret = pre(dn, data)) != NULL)) 107 if (pre && ((ret = pre(dn, data)) != NULL))