diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-06-25 14:32:48 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-06-29 02:58:15 -0400 |
commit | 0a3786c5f7575c0739ad94057213b931a9423502 (patch) | |
tree | 8877819dec87178ffad772279642cde2e3b7a63a | |
parent | 5ab65ecdaffd85753e7ad957622afcd709a39deb (diff) |
[POWERPC] Removed remnants of bus_offset
Removed the remants of bus_offset and use self_busno in the mv64x60 case
and use pci_assign_all_buses on 83xx/85xx.
83xx/85xx have multiple PHBs and the firmwares on these devices tend not
to handle topologies with P2P bridges well so we let Linux just reassign
the bus numbers to match.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/83xx/pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/indirect_pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_pci.c | 2 | ||||
-rw-r--r-- | include/asm-ppc/pci-bridge.h | 1 |
5 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 8da935c6e269..f49ed277e843 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -61,6 +61,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev) | |||
61 | " bus 0\n", dev->full_name); | 61 | " bus 0\n", dev->full_name); |
62 | } | 62 | } |
63 | 63 | ||
64 | pci_assign_all_buses = 1; | ||
64 | hose = pcibios_alloc_controller(); | 65 | hose = pcibios_alloc_controller(); |
65 | if (!hose) | 66 | if (!hose) |
66 | return -ENOMEM; | 67 | return -ENOMEM; |
@@ -80,7 +81,6 @@ int __init mpc83xx_add_bridge(struct device_node *dev) | |||
80 | if ((rsrc.start & 0xfffff) == 0x8600) { | 81 | if ((rsrc.start & 0xfffff) == 0x8600) { |
81 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); | 82 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); |
82 | primary = 0; | 83 | primary = 0; |
83 | hose->bus_offset = hose->first_busno; | ||
84 | } | 84 | } |
85 | 85 | ||
86 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " | 86 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " |
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c index be67f67ee6f4..a25b3e77a7d2 100644 --- a/arch/powerpc/platforms/85xx/pci.c +++ b/arch/powerpc/platforms/85xx/pci.c | |||
@@ -55,6 +55,7 @@ int __init mpc85xx_add_bridge(struct device_node *dev) | |||
55 | " bus 0\n", dev->full_name); | 55 | " bus 0\n", dev->full_name); |
56 | } | 56 | } |
57 | 57 | ||
58 | pci_assign_all_buses = 1; | ||
58 | hose = pcibios_alloc_controller(); | 59 | hose = pcibios_alloc_controller(); |
59 | if (!hose) | 60 | if (!hose) |
60 | return -ENOMEM; | 61 | return -ENOMEM; |
@@ -71,7 +72,6 @@ int __init mpc85xx_add_bridge(struct device_node *dev) | |||
71 | if ((rsrc.start & 0xfffff) == 0x9000) { | 72 | if ((rsrc.start & 0xfffff) == 0x9000) { |
72 | setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); | 73 | setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); |
73 | primary = 0; | 74 | primary = 0; |
74 | hose->bus_offset = hose->first_busno; | ||
75 | } | 75 | } |
76 | 76 | ||
77 | printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. " | 77 | printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. " |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index d490e71f0533..efe3cff8dcd1 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -44,7 +44,7 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
44 | cfg_type = 1; | 44 | cfg_type = 1; |
45 | 45 | ||
46 | bus_no = (bus->number == hose->first_busno) ? | 46 | bus_no = (bus->number == hose->first_busno) ? |
47 | hose->self_busno : bus->number - hose->bus_offset; | 47 | hose->self_busno : bus->number; |
48 | 48 | ||
49 | PCI_CFG_OUT(hose->cfg_addr, | 49 | PCI_CFG_OUT(hose->cfg_addr, |
50 | (0x80000000 | (bus_no << 16) | 50 | (0x80000000 | (bus_no << 16) |
@@ -87,7 +87,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
87 | cfg_type = 1; | 87 | cfg_type = 1; |
88 | 88 | ||
89 | bus_no = (bus->number == hose->first_busno) ? | 89 | bus_no = (bus->number == hose->first_busno) ? |
90 | hose->self_busno : bus->number - hose->bus_offset; | 90 | hose->self_busno : bus->number; |
91 | 91 | ||
92 | PCI_CFG_OUT(hose->cfg_addr, | 92 | PCI_CFG_OUT(hose->cfg_addr, |
93 | (0x80000000 | (bus_no << 16) | 93 | (0x80000000 | (bus_no << 16) |
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c index 6b08e76de5a2..2e7738455ae5 100644 --- a/arch/powerpc/sysdev/mv64x60_pci.c +++ b/arch/powerpc/sysdev/mv64x60_pci.c | |||
@@ -147,7 +147,7 @@ static int __init mv64x60_add_bridge(struct device_node *dev) | |||
147 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 147 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
148 | 148 | ||
149 | setup_indirect_pci(hose, rsrc.start, rsrc.start + 4); | 149 | setup_indirect_pci(hose, rsrc.start, rsrc.start + 4); |
150 | hose->bus_offset = hose->first_busno; | 150 | hose->self_busno = hose->first_busno; |
151 | 151 | ||
152 | printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. " | 152 | printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. " |
153 | "Firmware bus number: %d->%d\n", | 153 | "Firmware bus number: %d->%d\n", |
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h index 2c2abdaad42f..70aab6691043 100644 --- a/include/asm-ppc/pci-bridge.h +++ b/include/asm-ppc/pci-bridge.h | |||
@@ -48,6 +48,7 @@ struct pci_controller { | |||
48 | int first_busno; | 48 | int first_busno; |
49 | int last_busno; | 49 | int last_busno; |
50 | int self_busno; | 50 | int self_busno; |
51 | /* bus_offset is only used by ARCH=ppc */ | ||
51 | int bus_offset; | 52 | int bus_offset; |
52 | 53 | ||
53 | void __iomem *io_base_virt; | 54 | void __iomem *io_base_virt; |