diff options
Diffstat (limited to 'arch/powerpc/platforms/chrp')
-rw-r--r-- | arch/powerpc/platforms/chrp/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/chrp/Kconfig b/arch/powerpc/platforms/chrp/Kconfig index d2c690531963..22b4b4e3b6f0 100644 --- a/arch/powerpc/platforms/chrp/Kconfig +++ b/arch/powerpc/platforms/chrp/Kconfig | |||
@@ -8,4 +8,5 @@ config PPC_CHRP | |||
8 | select PPC_MPC106 | 8 | select PPC_MPC106 |
9 | select PPC_UDBG_16550 | 9 | select PPC_UDBG_16550 |
10 | select PPC_NATIVE | 10 | select PPC_NATIVE |
11 | select PCI | ||
11 | default y | 12 | default y |
diff --git a/arch/powerpc/platforms/chrp/Makefile b/arch/powerpc/platforms/chrp/Makefile index 902feb1ac431..4b3bfadc70fa 100644 --- a/arch/powerpc/platforms/chrp/Makefile +++ b/arch/powerpc/platforms/chrp/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | obj-y += setup.o time.o pegasos_eth.o | 1 | obj-y += setup.o time.o pegasos_eth.o pci.o |
2 | obj-$(CONFIG_PCI) += pci.o | ||
3 | obj-$(CONFIG_SMP) += smp.o | 2 | obj-$(CONFIG_SMP) += smp.o |
4 | obj-$(CONFIG_NVRAM) += nvram.o | 3 | obj-$(CONFIG_NVRAM) += nvram.o |
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 | ||