diff options
Diffstat (limited to 'arch/powerpc/platforms/cell/celleb_pci.c')
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_pci.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c index 404d1fc04d59..5822141aa63f 100644 --- a/arch/powerpc/platforms/cell/celleb_pci.c +++ b/arch/powerpc/platforms/cell/celleb_pci.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
42 | #include <asm/ppc-pci.h> | 42 | #include <asm/ppc-pci.h> |
43 | 43 | ||
44 | #include "io-workarounds.h" | ||
45 | #include "celleb_pci.h" | 44 | #include "celleb_pci.h" |
46 | 45 | ||
47 | #define MAX_PCI_DEVICES 32 | 46 | #define MAX_PCI_DEVICES 32 |
@@ -320,7 +319,7 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node, | |||
320 | 319 | ||
321 | size = 256; | 320 | size = 256; |
322 | config = &private->fake_config[devno][fn]; | 321 | config = &private->fake_config[devno][fn]; |
323 | *config = alloc_maybe_bootmem(size, GFP_KERNEL); | 322 | *config = zalloc_maybe_bootmem(size, GFP_KERNEL); |
324 | if (*config == NULL) { | 323 | if (*config == NULL) { |
325 | printk(KERN_ERR "PCI: " | 324 | printk(KERN_ERR "PCI: " |
326 | "not enough memory for fake configuration space\n"); | 325 | "not enough memory for fake configuration space\n"); |
@@ -331,7 +330,7 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node, | |||
331 | 330 | ||
332 | size = sizeof(struct celleb_pci_resource); | 331 | size = sizeof(struct celleb_pci_resource); |
333 | res = &private->res[devno][fn]; | 332 | res = &private->res[devno][fn]; |
334 | *res = alloc_maybe_bootmem(size, GFP_KERNEL); | 333 | *res = zalloc_maybe_bootmem(size, GFP_KERNEL); |
335 | if (*res == NULL) { | 334 | if (*res == NULL) { |
336 | printk(KERN_ERR | 335 | printk(KERN_ERR |
337 | "PCI: not enough memory for resource data space\n"); | 336 | "PCI: not enough memory for resource data space\n"); |
@@ -432,7 +431,7 @@ static int __init phb_set_bus_ranges(struct device_node *dev, | |||
432 | static void __init celleb_alloc_private_mem(struct pci_controller *hose) | 431 | static void __init celleb_alloc_private_mem(struct pci_controller *hose) |
433 | { | 432 | { |
434 | hose->private_data = | 433 | hose->private_data = |
435 | alloc_maybe_bootmem(sizeof(struct celleb_pci_private), | 434 | zalloc_maybe_bootmem(sizeof(struct celleb_pci_private), |
436 | GFP_KERNEL); | 435 | GFP_KERNEL); |
437 | } | 436 | } |
438 | 437 | ||
@@ -469,18 +468,6 @@ static struct of_device_id celleb_phb_match[] __initdata = { | |||
469 | }, | 468 | }, |
470 | }; | 469 | }; |
471 | 470 | ||
472 | static int __init celleb_io_workaround_init(struct pci_controller *phb, | ||
473 | struct celleb_phb_spec *phb_spec) | ||
474 | { | ||
475 | if (phb_spec->ops) { | ||
476 | iowa_register_bus(phb, phb_spec->ops, phb_spec->iowa_init, | ||
477 | phb_spec->iowa_data); | ||
478 | io_workaround_init(); | ||
479 | } | ||
480 | |||
481 | return 0; | ||
482 | } | ||
483 | |||
484 | int __init celleb_setup_phb(struct pci_controller *phb) | 471 | int __init celleb_setup_phb(struct pci_controller *phb) |
485 | { | 472 | { |
486 | struct device_node *dev = phb->dn; | 473 | struct device_node *dev = phb->dn; |
@@ -500,7 +487,11 @@ int __init celleb_setup_phb(struct pci_controller *phb) | |||
500 | if (rc) | 487 | if (rc) |
501 | return 1; | 488 | return 1; |
502 | 489 | ||
503 | return celleb_io_workaround_init(phb, phb_spec); | 490 | if (phb_spec->ops) |
491 | iowa_register_bus(phb, phb_spec->ops, | ||
492 | phb_spec->iowa_init, | ||
493 | phb_spec->iowa_data); | ||
494 | return 0; | ||
504 | } | 495 | } |
505 | 496 | ||
506 | int celleb_pci_probe_mode(struct pci_bus *bus) | 497 | int celleb_pci_probe_mode(struct pci_bus *bus) |