pci.c (3d5134ee8341bffc4f539049abb9e90d469b448d) pci.c (09b55f76c9e41ed88f445f64f00ed39b48ed137d)
1/*
2 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
3 * IBM Corp.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.

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

439 hose->cfg_data = ioremap(0xf2000000, 0x02000000);
440
441 hose->first_busno = 0;
442 hose->last_busno = 0xef;
443
444 u3_ht = hose;
445}
446
1/*
2 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
3 * IBM Corp.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.

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

439 hose->cfg_data = ioremap(0xf2000000, 0x02000000);
440
441 hose->first_busno = 0;
442 hose->last_busno = 0xef;
443
444 u3_ht = hose;
445}
446
447static int __init add_bridge(struct device_node *dev)
447static int __init maple_add_bridge(struct device_node *dev)
448{
449 int len;
450 struct pci_controller *hose;
451 char* disp_name;
452 const int *bus_range;
453 int primary = 1;
454
455 DBG("Adding PCI host bridge %s\n", dev->full_name);

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

536 }
537 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) {
538 if (!np->type)
539 continue;
540 if (strcmp(np->type, "pci") && strcmp(np->type, "ht"))
541 continue;
542 if ((of_device_is_compatible(np, "u4-pcie") ||
543 of_device_is_compatible(np, "u3-agp")) &&
448{
449 int len;
450 struct pci_controller *hose;
451 char* disp_name;
452 const int *bus_range;
453 int primary = 1;
454
455 DBG("Adding PCI host bridge %s\n", dev->full_name);

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

536 }
537 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) {
538 if (!np->type)
539 continue;
540 if (strcmp(np->type, "pci") && strcmp(np->type, "ht"))
541 continue;
542 if ((of_device_is_compatible(np, "u4-pcie") ||
543 of_device_is_compatible(np, "u3-agp")) &&
544 add_bridge(np) == 0)
544 maple_add_bridge(np) == 0)
545 of_node_get(np);
546
547 if (of_device_is_compatible(np, "u3-ht")) {
548 of_node_get(np);
549 ht = np;
550 }
551 }
552 of_node_put(root);
553
554 /* Now setup the HyperTransport host if we found any
555 */
545 of_node_get(np);
546
547 if (of_device_is_compatible(np, "u3-ht")) {
548 of_node_get(np);
549 ht = np;
550 }
551 }
552 of_node_put(root);
553
554 /* Now setup the HyperTransport host if we found any
555 */
556 if (ht && add_bridge(ht) != 0)
556 if (ht && maple_add_bridge(ht) != 0)
557 of_node_put(ht);
558
559 /* Setup the linkage between OF nodes and PHBs */
560 pci_devs_phb_init();
561
562 /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
563 * assume there is no P2P bridge on the AGP bus, which should be a
564 * safe assumptions hopefully.

--- 83 unchanged lines hidden ---
557 of_node_put(ht);
558
559 /* Setup the linkage between OF nodes and PHBs */
560 pci_devs_phb_init();
561
562 /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
563 * assume there is no P2P bridge on the AGP bus, which should be a
564 * safe assumptions hopefully.

--- 83 unchanged lines hidden ---