pci.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) pci.c (8cc7581cdb84a232468c41bc417183a423dfbb07)
1/*
2 * Support for PCI bridges found on Power Macintoshes.
3 *
4 * Copyright (C) 2003-2005 Benjamin Herrenschmuidt (benh@kernel.crashing.org)
5 * Copyright (C) 1997 Paul Mackerras (paulus@samba.org)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

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

873 dev->vendor == PCI_VENDOR_ID_DEC &&
874 dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS) {
875 dev->irq = irq_create_mapping(NULL, 60);
876 irq_set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
877 }
878#endif /* CONFIG_PPC32 */
879}
880
1/*
2 * Support for PCI bridges found on Power Macintoshes.
3 *
4 * Copyright (C) 2003-2005 Benjamin Herrenschmuidt (benh@kernel.crashing.org)
5 * Copyright (C) 1997 Paul Mackerras (paulus@samba.org)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

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

873 dev->vendor == PCI_VENDOR_ID_DEC &&
874 dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS) {
875 dev->irq = irq_create_mapping(NULL, 60);
876 irq_set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
877 }
878#endif /* CONFIG_PPC32 */
879}
880
881#ifdef CONFIG_PPC64
882static int pmac_pci_root_bridge_prepare(struct pci_host_bridge *bridge)
883{
884 struct pci_controller *hose = pci_bus_to_host(bridge->bus);
885 struct device_node *np, *child;
886
887 if (hose != u3_agp)
888 return 0;
889
890 /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
891 * assume there is no P2P bridge on the AGP bus, which should be a
892 * safe assumptions for now. We should do something better in the
893 * future though
894 */
895 np = hose->dn;
896 PCI_DN(np)->busno = 0xf0;
897 for_each_child_of_node(np, child)
898 PCI_DN(child)->busno = 0xf0;
899
900 return 0;
901}
902#endif /* CONFIG_PPC64 */
903
881void __init pmac_pci_init(void)
882{
883 struct device_node *np, *root;
884 struct device_node *ht = NULL;
885
886 pci_set_flags(PCI_CAN_SKIP_ISA_ALIGN);
887
888 root = of_find_node_by_path("/");

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

909
910#ifdef CONFIG_PPC64
911 /* Probe HT last as it relies on the agp resources to be already
912 * setup
913 */
914 if (ht && pmac_add_bridge(ht) != 0)
915 of_node_put(ht);
916
904void __init pmac_pci_init(void)
905{
906 struct device_node *np, *root;
907 struct device_node *ht = NULL;
908
909 pci_set_flags(PCI_CAN_SKIP_ISA_ALIGN);
910
911 root = of_find_node_by_path("/");

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

932
933#ifdef CONFIG_PPC64
934 /* Probe HT last as it relies on the agp resources to be already
935 * setup
936 */
937 if (ht && pmac_add_bridge(ht) != 0)
938 of_node_put(ht);
939
917 /* Setup the linkage between OF nodes and PHBs */
918 pci_devs_phb_init();
919
920 /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
921 * assume there is no P2P bridge on the AGP bus, which should be a
922 * safe assumptions for now. We should do something better in the
923 * future though
924 */
925 if (u3_agp) {
926 struct device_node *np = u3_agp->dn;
927 PCI_DN(np)->busno = 0xf0;
928 for (np = np->child; np; np = np->sibling)
929 PCI_DN(np)->busno = 0xf0;
930 }
940 ppc_md.pcibios_root_bridge_prepare = pmac_pci_root_bridge_prepare;
931 /* pmac_check_ht_link(); */
932
933#else /* CONFIG_PPC64 */
934 init_p2pbridge();
935 init_second_ohare();
936 fixup_nec_usb2();
937
938 /* We are still having some issues with the Xserve G4, enabling

--- 317 unchanged lines hidden ---
941 /* pmac_check_ht_link(); */
942
943#else /* CONFIG_PPC64 */
944 init_p2pbridge();
945 init_second_ohare();
946 fixup_nec_usb2();
947
948 /* We are still having some issues with the Xserve G4, enabling

--- 317 unchanged lines hidden ---