[POWERPC] Pass the pci_controller into pci_exclude_device
[pandora-kernel.git] / arch / powerpc / platforms / 83xx / pci.c
index 5d84a9c..f92e71f 100644 (file)
@@ -35,7 +35,7 @@
 
 int mpc83xx_pci2_busno;
 
-int mpc83xx_exclude_device(u_char bus, u_char devfn)
+int mpc83xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
 {
        if (bus == 0 && PCI_SLOT(devfn) == 0)
                return PCIBIOS_DEVICE_NOT_FOUND;
@@ -45,21 +45,12 @@ int mpc83xx_exclude_device(u_char bus, u_char devfn)
        return PCIBIOS_SUCCESSFUL;
 }
 
-void __init mpc83xx_pcibios_fixup(void)
-{
-       struct pci_dev *dev = NULL;
-
-       /* map all the PCI irqs */
-       for_each_pci_dev(dev)
-               pci_read_irq_line(dev);
-}
-
-int __init add_bridge(struct device_node *dev)
+int __init mpc83xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
        struct resource rsrc;
-       int *bus_range;
+       const int *bus_range;
        int primary = 1, has_address = 0;
        phys_addr_t immr = get_immrbase();
 
@@ -69,7 +60,7 @@ int __init add_bridge(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = (int *)get_property(dev, "bus-range", &len);
+       bus_range = of_get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);
@@ -79,7 +70,6 @@ int __init add_bridge(struct device_node *dev)
        if (!hose)
                return -ENOMEM;
        hose->arch_data = dev;
-       hose->set_cfg_type = 1;
 
        hose->first_busno = bus_range ? bus_range[0] : 0;
        hose->last_busno = bus_range ? bus_range[1] : 0xff;