diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/iSeries_pci.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/maple_pci.c | 56 | ||||
-rw-r--r-- | arch/ppc64/kernel/pmac_pci.c | 60 |
3 files changed, 59 insertions, 59 deletions
diff --git a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c index 356e4fd9a94f..fbc273c32bcc 100644 --- a/arch/ppc64/kernel/iSeries_pci.c +++ b/arch/ppc64/kernel/iSeries_pci.c | |||
@@ -252,7 +252,7 @@ unsigned long __init find_and_init_phbs(void) | |||
252 | phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL); | 252 | phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL); |
253 | if (phb == NULL) | 253 | if (phb == NULL) |
254 | return -ENOMEM; | 254 | return -ENOMEM; |
255 | pci_setup_pci_controller(phb); | 255 | pci_setup_pci_controller(phb); |
256 | 256 | ||
257 | phb->pci_mem_offset = phb->local_number = bus; | 257 | phb->pci_mem_offset = phb->local_number = bus; |
258 | phb->first_busno = bus; | 258 | phb->first_busno = bus; |
diff --git a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c index 5a8b4d8c2dd6..1d297e0edfc0 100644 --- a/arch/ppc64/kernel/maple_pci.c +++ b/arch/ppc64/kernel/maple_pci.c | |||
@@ -283,7 +283,7 @@ static void __init setup_u3_agp(struct pci_controller* hose) | |||
283 | * the reg address cell, we shall fix that by killing struct | 283 | * the reg address cell, we shall fix that by killing struct |
284 | * reg_property and using some accessor functions instead | 284 | * reg_property and using some accessor functions instead |
285 | */ | 285 | */ |
286 | hose->first_busno = 0xf0; | 286 | hose->first_busno = 0xf0; |
287 | hose->last_busno = 0xff; | 287 | hose->last_busno = 0xff; |
288 | hose->ops = &u3_agp_pci_ops; | 288 | hose->ops = &u3_agp_pci_ops; |
289 | hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); | 289 | hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); |
@@ -315,24 +315,24 @@ static int __init add_bridge(struct device_node *dev) | |||
315 | char* disp_name; | 315 | char* disp_name; |
316 | int *bus_range; | 316 | int *bus_range; |
317 | int primary = 1; | 317 | int primary = 1; |
318 | struct property *of_prop; | 318 | struct property *of_prop; |
319 | 319 | ||
320 | DBG("Adding PCI host bridge %s\n", dev->full_name); | 320 | DBG("Adding PCI host bridge %s\n", dev->full_name); |
321 | 321 | ||
322 | bus_range = (int *) get_property(dev, "bus-range", &len); | 322 | bus_range = (int *) get_property(dev, "bus-range", &len); |
323 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 323 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
324 | printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", | 324 | printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", |
325 | dev->full_name); | 325 | dev->full_name); |
326 | } | 326 | } |
327 | 327 | ||
328 | hose = alloc_bootmem(sizeof(struct pci_controller)); | 328 | hose = alloc_bootmem(sizeof(struct pci_controller)); |
329 | if (hose == NULL) | 329 | if (hose == NULL) |
330 | return -ENOMEM; | 330 | return -ENOMEM; |
331 | pci_setup_pci_controller(hose); | 331 | pci_setup_pci_controller(hose); |
332 | 332 | ||
333 | hose->arch_data = dev; | 333 | hose->arch_data = dev; |
334 | hose->first_busno = bus_range ? bus_range[0] : 0; | 334 | hose->first_busno = bus_range ? bus_range[0] : 0; |
335 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 335 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
336 | 336 | ||
337 | of_prop = alloc_bootmem(sizeof(struct property) + | 337 | of_prop = alloc_bootmem(sizeof(struct property) + |
338 | sizeof(hose->global_number)); | 338 | sizeof(hose->global_number)); |
@@ -346,25 +346,25 @@ static int __init add_bridge(struct device_node *dev) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | disp_name = NULL; | 348 | disp_name = NULL; |
349 | if (device_is_compatible(dev, "u3-agp")) { | 349 | if (device_is_compatible(dev, "u3-agp")) { |
350 | setup_u3_agp(hose); | 350 | setup_u3_agp(hose); |
351 | disp_name = "U3-AGP"; | 351 | disp_name = "U3-AGP"; |
352 | primary = 0; | 352 | primary = 0; |
353 | } else if (device_is_compatible(dev, "u3-ht")) { | 353 | } else if (device_is_compatible(dev, "u3-ht")) { |
354 | setup_u3_ht(hose); | 354 | setup_u3_ht(hose); |
355 | disp_name = "U3-HT"; | 355 | disp_name = "U3-HT"; |
356 | primary = 1; | 356 | primary = 1; |
357 | } | 357 | } |
358 | printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", | 358 | printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", |
359 | disp_name, hose->first_busno, hose->last_busno); | 359 | disp_name, hose->first_busno, hose->last_busno); |
360 | 360 | ||
361 | /* Interpret the "ranges" property */ | 361 | /* Interpret the "ranges" property */ |
362 | /* This also maps the I/O region and sets isa_io/mem_base */ | 362 | /* This also maps the I/O region and sets isa_io/mem_base */ |
363 | pci_process_bridge_OF_ranges(hose, dev); | 363 | pci_process_bridge_OF_ranges(hose, dev); |
364 | pci_setup_phb_io(hose, primary); | 364 | pci_setup_phb_io(hose, primary); |
365 | 365 | ||
366 | /* Fixup "bus-range" OF property */ | 366 | /* Fixup "bus-range" OF property */ |
367 | fixup_bus_range(dev); | 367 | fixup_bus_range(dev); |
368 | 368 | ||
369 | return 0; | 369 | return 0; |
370 | } | 370 | } |
diff --git a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c index d37bff2d7d40..dc40a0cad0b4 100644 --- a/arch/ppc64/kernel/pmac_pci.c +++ b/arch/ppc64/kernel/pmac_pci.c | |||
@@ -388,7 +388,7 @@ static void __init setup_u3_agp(struct pci_controller* hose) | |||
388 | * the reg address cell, we shall fix that by killing struct | 388 | * the reg address cell, we shall fix that by killing struct |
389 | * reg_property and using some accessor functions instead | 389 | * reg_property and using some accessor functions instead |
390 | */ | 390 | */ |
391 | hose->first_busno = 0xf0; | 391 | hose->first_busno = 0xf0; |
392 | hose->last_busno = 0xff; | 392 | hose->last_busno = 0xff; |
393 | has_uninorth = 1; | 393 | has_uninorth = 1; |
394 | hose->ops = ¯isc_pci_ops; | 394 | hose->ops = ¯isc_pci_ops; |
@@ -473,7 +473,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) | |||
473 | continue; | 473 | continue; |
474 | } | 474 | } |
475 | cur++; | 475 | cur++; |
476 | DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n", | 476 | DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n", |
477 | cur-1, res->start - 1, cur, res->end + 1); | 477 | cur-1, res->start - 1, cur, res->end + 1); |
478 | hose->mem_resources[cur].name = np->full_name; | 478 | hose->mem_resources[cur].name = np->full_name; |
479 | hose->mem_resources[cur].flags = IORESOURCE_MEM; | 479 | hose->mem_resources[cur].flags = IORESOURCE_MEM; |
@@ -603,24 +603,24 @@ static int __init add_bridge(struct device_node *dev) | |||
603 | char* disp_name; | 603 | char* disp_name; |
604 | int *bus_range; | 604 | int *bus_range; |
605 | int primary = 1; | 605 | int primary = 1; |
606 | struct property *of_prop; | 606 | struct property *of_prop; |
607 | 607 | ||
608 | DBG("Adding PCI host bridge %s\n", dev->full_name); | 608 | DBG("Adding PCI host bridge %s\n", dev->full_name); |
609 | 609 | ||
610 | bus_range = (int *) get_property(dev, "bus-range", &len); | 610 | bus_range = (int *) get_property(dev, "bus-range", &len); |
611 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 611 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
612 | printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", | 612 | printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", |
613 | dev->full_name); | 613 | dev->full_name); |
614 | } | 614 | } |
615 | 615 | ||
616 | hose = alloc_bootmem(sizeof(struct pci_controller)); | 616 | hose = alloc_bootmem(sizeof(struct pci_controller)); |
617 | if (hose == NULL) | 617 | if (hose == NULL) |
618 | return -ENOMEM; | 618 | return -ENOMEM; |
619 | pci_setup_pci_controller(hose); | 619 | pci_setup_pci_controller(hose); |
620 | 620 | ||
621 | hose->arch_data = dev; | 621 | hose->arch_data = dev; |
622 | hose->first_busno = bus_range ? bus_range[0] : 0; | 622 | hose->first_busno = bus_range ? bus_range[0] : 0; |
623 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 623 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
624 | 624 | ||
625 | of_prop = alloc_bootmem(sizeof(struct property) + | 625 | of_prop = alloc_bootmem(sizeof(struct property) + |
626 | sizeof(hose->global_number)); | 626 | sizeof(hose->global_number)); |
@@ -634,24 +634,24 @@ static int __init add_bridge(struct device_node *dev) | |||
634 | } | 634 | } |
635 | 635 | ||
636 | disp_name = NULL; | 636 | disp_name = NULL; |
637 | if (device_is_compatible(dev, "u3-agp")) { | 637 | if (device_is_compatible(dev, "u3-agp")) { |
638 | setup_u3_agp(hose); | 638 | setup_u3_agp(hose); |
639 | disp_name = "U3-AGP"; | 639 | disp_name = "U3-AGP"; |
640 | primary = 0; | 640 | primary = 0; |
641 | } else if (device_is_compatible(dev, "u3-ht")) { | 641 | } else if (device_is_compatible(dev, "u3-ht")) { |
642 | setup_u3_ht(hose); | 642 | setup_u3_ht(hose); |
643 | disp_name = "U3-HT"; | 643 | disp_name = "U3-HT"; |
644 | primary = 1; | 644 | primary = 1; |
645 | } | 645 | } |
646 | printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", | 646 | printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", |
647 | disp_name, hose->first_busno, hose->last_busno); | 647 | disp_name, hose->first_busno, hose->last_busno); |
648 | 648 | ||
649 | /* Interpret the "ranges" property */ | 649 | /* Interpret the "ranges" property */ |
650 | /* This also maps the I/O region and sets isa_io/mem_base */ | 650 | /* This also maps the I/O region and sets isa_io/mem_base */ |
651 | pmac_process_bridge_OF_ranges(hose, dev, primary); | 651 | pmac_process_bridge_OF_ranges(hose, dev, primary); |
652 | 652 | ||
653 | /* Fixup "bus-range" OF property */ | 653 | /* Fixup "bus-range" OF property */ |
654 | fixup_bus_range(dev); | 654 | fixup_bus_range(dev); |
655 | 655 | ||
656 | return 0; | 656 | return 0; |
657 | } | 657 | } |