powerpc/pci: Remove pcibios_do_bus_setup()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 27 Oct 2008 19:48:33 +0000 (19:48 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 5 Nov 2008 11:11:53 +0000 (22:11 +1100)
The function pcibios_do_bus_setup() was used by pcibios_fixup_bus()
to perform setup that is different between the 32-bit and 64-bit
code.  This difference no longer exists, thus the function is removed
and the setup now done directly from pci-common.c.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/include/asm/pci.h
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c

index 57a2a494886befada20215df66518bfe37ec6e17..55542ac3eadb2a689f3870841db8e11d7ae3506e 100644 (file)
@@ -235,7 +235,6 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
                                 const struct resource *rsrc,
                                 resource_size_t *start, resource_size_t *end);
 
-extern void pcibios_do_bus_setup(struct pci_bus *bus);
 extern void pcibios_fixup_of_probed_bus(struct pci_bus *bus);
 
 
index 6d46bfabdbe431cdf623a7097bceba3160942c2e..780db386c1f0c78eb37423695447c2843383c032 100644 (file)
@@ -1076,18 +1076,24 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
 
 static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
 {
-       struct pci_dev *dev = bus->self;
+       struct pci_dev *dev;
 
-       pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
+       pr_debug("PCI: Fixup bus %d (%s)\n",
+                bus->number, bus->self ? pci_name(bus->self) : "PHB");
 
        /* Fixup PCI<->PCI bridges. Host bridges are handled separately, for
         * now differently between 32 and 64 bits.
         */
-       if (dev != NULL)
+       if (bus->self != NULL)
                pcibios_fixup_bridge(bus);
 
-       /* Additional setup that is different between 32 and 64 bits for now */
-       pcibios_do_bus_setup(bus);
+       /* Setup bus DMA mappings */
+       if (ppc_md.pci_dma_bus_setup)
+               ppc_md.pci_dma_bus_setup(bus);
+
+       /* Setup DMA for all PCI devices on that bus */
+       list_for_each_entry(dev, &bus->devices, bus_list)
+               pcibios_setup_new_device(dev);
 
        /* Platform specific bus fixups */
        if (ppc_md.pcibios_fixup_bus)
index 883040358273637d4e96f6eb876f078ecd1b56d8..7ad11e592f2ba62a65e6a8b35a9b71958b8e9504 100644 (file)
@@ -446,17 +446,6 @@ static int __init pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-
-       if (ppc_md.pci_dma_bus_setup)
-               ppc_md.pci_dma_bus_setup(bus);
-
-       list_for_each_entry(dev, &bus->devices, bus_list)
-               pcibios_setup_new_device(dev);
-}
-
 /* the next one is stolen from the alpha port... */
 void __init
 pcibios_update_irq(struct pci_dev *dev, int irq)
index f5fc547284bca6eb26059928c49ffd3c48478123..e6e8813c364aba72c9a3b7fa80497d0955555590 100644 (file)
@@ -507,17 +507,6 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
 }
 EXPORT_SYMBOL_GPL(pcibios_map_io_space);
 
-void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-
-       if (ppc_md.pci_dma_bus_setup)
-               ppc_md.pci_dma_bus_setup(bus);
-
-       list_for_each_entry(dev, &bus->devices, bus_list)
-               pcibios_setup_new_device(dev);
-}
-
 unsigned long pci_address_to_pio(phys_addr_t address)
 {
        struct pci_controller *hose, *tmp;