]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/52xx/mpc52xx_pci.c
Pull cpuidle into release branch
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / 52xx / mpc52xx_pci.c
index 34d34a26d30576faf647160b4334bee6e56d0327..4c6c82a684b1eb23bb43642b86200d564c491f29 100644 (file)
@@ -112,18 +112,18 @@ mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
        u32 value;
 
        if (ppc_md.pci_exclude_device)
-               if (ppc_md.pci_exclude_device(bus->number, devfn))
+               if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
                        return PCIBIOS_DEVICE_NOT_FOUND;
 
        out_be32(hose->cfg_addr,
                (1 << 31) |
-               ((bus->number - hose->bus_offset) << 16) |
+               (bus->number << 16) |
                (devfn << 8) |
                (offset & 0xfc));
        mb();
 
 #if defined(CONFIG_PPC_MPC5200_BUGFIX)
-       if (bus->number != hose->bus_offset) {
+       if (bus->number) {
                /* workaround for the bug 435 of the MPC5200 (L25R);
                 * Don't do 32 bits config access during type-1 cycles */
                switch (len) {
@@ -169,18 +169,18 @@ mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
        u32 value, mask;
 
        if (ppc_md.pci_exclude_device)
-               if (ppc_md.pci_exclude_device(bus->number, devfn))
+               if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
                        return PCIBIOS_DEVICE_NOT_FOUND;
 
        out_be32(hose->cfg_addr,
                (1 << 31) |
-               ((bus->number - hose->bus_offset) << 16) |
+               (bus->number << 16) |
                (devfn << 8) |
                (offset & 0xfc));
        mb();
 
 #if defined(CONFIG_PPC_MPC5200_BUGFIX)
-       if (bus->number != hose->bus_offset) {
+       if (bus->number) {
                /* workaround for the bug 435 of the MPC5200 (L25R);
                 * Don't do 32 bits config access during type-1 cycles */
                switch (len) {
@@ -385,17 +385,13 @@ mpc52xx_add_bridge(struct device_node *node)
         * tree are needed to configure the 52xx PCI controller.  Rather
         * than parse the tree here, let pci_process_bridge_OF_ranges()
         * do it for us and extract the values after the fact */
-       hose = pcibios_alloc_controller();
+       hose = pcibios_alloc_controller(node);
        if (!hose)
                return -ENOMEM;
 
-       hose->arch_data = node;
-       hose->set_cfg_type = 1;
-
        hose->first_busno = bus_range ? bus_range[0] : 0;
        hose->last_busno = bus_range ? bus_range[1] : 0xff;
 
-       hose->bus_offset = 0;
        hose->ops = &mpc52xx_pci_ops;
 
        pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);