aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r--arch/powerpc/kernel/pci-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index a5c0153ede37..7fdf324d5b51 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -78,6 +78,7 @@ EXPORT_SYMBOL(get_pci_dma_ops);
78static int get_phb_number(struct device_node *dn) 78static int get_phb_number(struct device_node *dn)
79{ 79{
80 int ret, phb_id = -1; 80 int ret, phb_id = -1;
81 u32 prop_32;
81 u64 prop; 82 u64 prop;
82 83
83 /* 84 /*
@@ -86,8 +87,10 @@ static int get_phb_number(struct device_node *dn)
86 * reading "ibm,opal-phbid", only present in OPAL environment. 87 * reading "ibm,opal-phbid", only present in OPAL environment.
87 */ 88 */
88 ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop); 89 ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
89 if (ret) 90 if (ret) {
90 ret = of_property_read_u32_index(dn, "reg", 1, (u32 *)&prop); 91 ret = of_property_read_u32_index(dn, "reg", 1, &prop_32);
92 prop = prop_32;
93 }
91 94
92 if (!ret) 95 if (!ret)
93 phb_id = (int)(prop & (MAX_PHBS - 1)); 96 phb_id = (int)(prop & (MAX_PHBS - 1));