pci.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) pci.c (8cc7581cdb84a232468c41bc417183a423dfbb07)
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.

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

563 dev->device == PCI_DEVICE_ID_AMD_8111_IDE &&
564 (dev->class & 5) != 5) {
565 dev->irq = NO_IRQ;
566 }
567
568 DBG(" <- maple_pci_irq_fixup\n");
569}
570
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.

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

563 dev->device == PCI_DEVICE_ID_AMD_8111_IDE &&
564 (dev->class & 5) != 5) {
565 dev->irq = NO_IRQ;
566 }
567
568 DBG(" <- maple_pci_irq_fixup\n");
569}
570
571static int maple_pci_root_bridge_prepare(struct pci_host_bridge *bridge)
572{
573 struct pci_controller *hose = pci_bus_to_host(bridge->bus);
574 struct device_node *np, *child;
575
576 if (hose != u3_agp)
577 return 0;
578
579 /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
580 * assume there is no P2P bridge on the AGP bus, which should be a
581 * safe assumptions hopefully.
582 */
583 np = hose->dn;
584 PCI_DN(np)->busno = 0xf0;
585 for_each_child_of_node(np, child)
586 PCI_DN(child)->busno = 0xf0;
587
588 return 0;
589}
590
571void __init maple_pci_init(void)
572{
573 struct device_node *np, *root;
574 struct device_node *ht = NULL;
575
576 /* Probe root PCI hosts, that is on U3 the AGP host and the
577 * HyperTransport host. That one is actually "kept" around
578 * and actually added last as it's resource management relies

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

600 }
601 of_node_put(root);
602
603 /* Now setup the HyperTransport host if we found any
604 */
605 if (ht && maple_add_bridge(ht) != 0)
606 of_node_put(ht);
607
591void __init maple_pci_init(void)
592{
593 struct device_node *np, *root;
594 struct device_node *ht = NULL;
595
596 /* Probe root PCI hosts, that is on U3 the AGP host and the
597 * HyperTransport host. That one is actually "kept" around
598 * and actually added last as it's resource management relies

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

620 }
621 of_node_put(root);
622
623 /* Now setup the HyperTransport host if we found any
624 */
625 if (ht && maple_add_bridge(ht) != 0)
626 of_node_put(ht);
627
608 /* Setup the linkage between OF nodes and PHBs */
609 pci_devs_phb_init();
628 ppc_md.pcibios_root_bridge_prepare = maple_pci_root_bridge_prepare;
610
629
611 /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
612 * assume there is no P2P bridge on the AGP bus, which should be a
613 * safe assumptions hopefully.
614 */
615 if (u3_agp) {
616 struct device_node *np = u3_agp->dn;
617 PCI_DN(np)->busno = 0xf0;
618 for (np = np->child; np; np = np->sibling)
619 PCI_DN(np)->busno = 0xf0;
620 }
621
622 /* Tell pci.c to not change any resource allocations. */
623 pci_add_flags(PCI_PROBE_ONLY);
624}
625
626int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
627{
628 struct device_node *np;
629 unsigned int defirq = channel ? 15 : 14;

--- 37 unchanged lines hidden ---
630 /* Tell pci.c to not change any resource allocations. */
631 pci_add_flags(PCI_PROBE_ONLY);
632}
633
634int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
635{
636 struct device_node *np;
637 unsigned int defirq = channel ? 15 : 14;

--- 37 unchanged lines hidden ---