aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/chrp/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/chrp/pci.c')
-rw-r--r--arch/powerpc/platforms/chrp/pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index d32fedc991d3..3690624e49d4 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -99,7 +99,7 @@ int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
99 struct pci_controller *hose = bus->sysdata; 99 struct pci_controller *hose = bus->sysdata;
100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
101 | (((bus->number - hose->first_busno) & 0xff) << 16) 101 | (((bus->number - hose->first_busno) & 0xff) << 16)
102 | (hose->index << 24); 102 | (hose->global_number << 24);
103 int ret = -1; 103 int ret = -1;
104 int rval; 104 int rval;
105 105
@@ -114,7 +114,7 @@ int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
114 struct pci_controller *hose = bus->sysdata; 114 struct pci_controller *hose = bus->sysdata;
115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
116 | (((bus->number - hose->first_busno) & 0xff) << 16) 116 | (((bus->number - hose->first_busno) & 0xff) << 16)
117 | (hose->index << 24); 117 | (hose->global_number << 24);
118 int rval; 118 int rval;
119 119
120 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, 120 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
@@ -254,13 +254,12 @@ chrp_find_bridges(void)
254 printk(" at %llx", (unsigned long long)r.start); 254 printk(" at %llx", (unsigned long long)r.start);
255 printk("\n"); 255 printk("\n");
256 256
257 hose = pcibios_alloc_controller(); 257 hose = pcibios_alloc_controller(dev);
258 if (!hose) { 258 if (!hose) {
259 printk("Can't allocate PCI controller structure for %s\n", 259 printk("Can't allocate PCI controller structure for %s\n",
260 dev->full_name); 260 dev->full_name);
261 continue; 261 continue;
262 } 262 }
263 hose->arch_data = dev;
264 hose->first_busno = bus_range[0]; 263 hose->first_busno = bus_range[0];
265 hose->last_busno = bus_range[1]; 264 hose->last_busno = bus_range[1];
266 265