aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/pci_64.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 3b0f49ea4756..93b2920effc5 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -231,7 +231,6 @@ static unsigned int pci_parse_of_flags(u32 addr0)
231 return flags; 231 return flags;
232} 232}
233 233
234#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1])
235 234
236static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) 235static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
237{ 236{
@@ -250,8 +249,8 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
250 flags = pci_parse_of_flags(addrs[0]); 249 flags = pci_parse_of_flags(addrs[0]);
251 if (!flags) 250 if (!flags)
252 continue; 251 continue;
253 base = GET_64BIT(addrs, 1); 252 base = of_read_number(&addrs[1], 2);
254 size = GET_64BIT(addrs, 3); 253 size = of_read_number(&addrs[3], 2);
255 if (!size) 254 if (!size)
256 continue; 255 continue;
257 i = addrs[0] & 0xff; 256 i = addrs[0] & 0xff;
@@ -417,7 +416,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
417 i = 1; 416 i = 1;
418 for (; len >= 32; len -= 32, ranges += 8) { 417 for (; len >= 32; len -= 32, ranges += 8) {
419 flags = pci_parse_of_flags(ranges[0]); 418 flags = pci_parse_of_flags(ranges[0]);
420 size = GET_64BIT(ranges, 6); 419 size = of_read_number(&ranges[6], 2);
421 if (flags == 0 || size == 0) 420 if (flags == 0 || size == 0)
422 continue; 421 continue;
423 if (flags & IORESOURCE_IO) { 422 if (flags & IORESOURCE_IO) {
@@ -436,7 +435,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
436 res = bus->resource[i]; 435 res = bus->resource[i];
437 ++i; 436 ++i;
438 } 437 }
439 res->start = GET_64BIT(ranges, 1); 438 res->start = of_read_number(&ranges[1], 2);
440 res->end = res->start + size - 1; 439 res->end = res->start + size - 1;
441 res->flags = flags; 440 res->flags = flags;
442 fixup_resource(res, dev); 441 fixup_resource(res, dev);