pci.c (cf40a76e7d5874bb25f4404eecc58a2e033af885) pci.c (6396bb221514d2876fd6dc0aa2a1f240d99b37bb)
1/*
2 * PCI / PCI-X / PCI-Express support for 4xx parts
3 *
4 * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Most PCI Express code is coming from Stefan Roese implementation for
7 * arch/ppc in the Denx tree, slightly reworked by me.
8 *

--- 1435 unchanged lines hidden (view full) ---

1444 if (ppc4xx_pciex_hwops == NULL) {
1445 printk(KERN_WARNING "PCIE: unknown host type %pOF\n", np);
1446 return -ENODEV;
1447 }
1448
1449 count = ppc4xx_pciex_hwops->core_init(np);
1450 if (count > 0) {
1451 ppc4xx_pciex_ports =
1/*
2 * PCI / PCI-X / PCI-Express support for 4xx parts
3 *
4 * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Most PCI Express code is coming from Stefan Roese implementation for
7 * arch/ppc in the Denx tree, slightly reworked by me.
8 *

--- 1435 unchanged lines hidden (view full) ---

1444 if (ppc4xx_pciex_hwops == NULL) {
1445 printk(KERN_WARNING "PCIE: unknown host type %pOF\n", np);
1446 return -ENODEV;
1447 }
1448
1449 count = ppc4xx_pciex_hwops->core_init(np);
1450 if (count > 0) {
1451 ppc4xx_pciex_ports =
1452 kzalloc(count * sizeof(struct ppc4xx_pciex_port),
1452 kcalloc(count, sizeof(struct ppc4xx_pciex_port),
1453 GFP_KERNEL);
1454 if (ppc4xx_pciex_ports) {
1455 ppc4xx_pciex_port_count = count;
1456 return 0;
1457 }
1458 printk(KERN_WARNING "PCIE: failed to allocate ports array\n");
1459 return -ENOMEM;
1460 }

--- 730 unchanged lines hidden ---
1453 GFP_KERNEL);
1454 if (ppc4xx_pciex_ports) {
1455 ppc4xx_pciex_port_count = count;
1456 return 0;
1457 }
1458 printk(KERN_WARNING "PCIE: failed to allocate ports array\n");
1459 return -ENOMEM;
1460 }

--- 730 unchanged lines hidden ---