blob: f611d0369cc8ceb275cc45a94ca04451dbe84950 [file] [log] [blame]
Jon Loeligerb809b3e2006-06-17 17:52:48 -05001/*
John Rigby5b70a092008-10-07 13:00:18 -06002 * MPC83xx/85xx/86xx PCI/PCIE support routing.
Jon Loeligerb809b3e2006-06-17 17:52:48 -05003 *
John Rigby5b70a092008-10-07 13:00:18 -06004 * Copyright 2007,2008 Freescale Semiconductor, Inc
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +08005 *
Jon Loeligerb809b3e2006-06-17 17:52:48 -05006 * Initial author: Xianghua Xiao <x.xiao@freescale.com>
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +08007 * Recode: ZHANG WEI <wei.zhang@freescale.com>
8 * Rewrite the routing for Frescale PCI and PCI Express
9 * Roy Zang <tie-fei.zang@freescale.com>
Jon Loeligerb809b3e2006-06-17 17:52:48 -050010 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080016#include <linux/kernel.h>
Jon Loeligerb809b3e2006-06-17 17:52:48 -050017#include <linux/pci.h>
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080018#include <linux/delay.h>
19#include <linux/string.h>
20#include <linux/init.h>
21#include <linux/bootmem.h>
Jon Loeligerb809b3e2006-06-17 17:52:48 -050022
Jon Loeligerb809b3e2006-06-17 17:52:48 -050023#include <asm/io.h>
24#include <asm/prom.h>
Jon Loeligerb809b3e2006-06-17 17:52:48 -050025#include <asm/pci-bridge.h>
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080026#include <asm/machdep.h>
Jon Loeligerb809b3e2006-06-17 17:52:48 -050027#include <sysdev/fsl_soc.h>
Roy Zang55c44992007-07-10 18:44:34 +080028#include <sysdev/fsl_pci.h>
Jon Loeligerb809b3e2006-06-17 17:52:48 -050029
John Rigby76fe1ff2008-06-26 11:07:57 -060030#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx)
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080031/* atmu setup for fsl pci/pcie controller */
Anton Vorontsovc9dadff2008-12-29 19:40:32 +030032static void __init setup_pci_atmu(struct pci_controller *hose,
33 struct resource *rsrc)
Jon Loeligerb809b3e2006-06-17 17:52:48 -050034{
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080035 struct ccsr_pci __iomem *pci;
36 int i;
Jon Loeligerb809b3e2006-06-17 17:52:48 -050037
Kumar Gala72b122c2008-01-14 17:02:19 -060038 pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n",
39 (u64)rsrc->start, (u64)rsrc->end - (u64)rsrc->start + 1);
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080040 pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
Jon Loeligerb809b3e2006-06-17 17:52:48 -050041
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080042 /* Disable all windows (except powar0 since its ignored) */
43 for(i = 1; i < 5; i++)
44 out_be32(&pci->pow[i].powar, 0);
45 for(i = 0; i < 3; i++)
46 out_be32(&pci->piw[i].piwar, 0);
Jon Loeligerb809b3e2006-06-17 17:52:48 -050047
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080048 /* Setup outbound MEM window */
49 for(i = 0; i < 3; i++)
50 if (hose->mem_resources[i].flags & IORESOURCE_MEM){
Kumar Gala72b122c2008-01-14 17:02:19 -060051 resource_size_t pci_addr_start =
52 hose->mem_resources[i].start -
53 hose->pci_mem_offset;
54 pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n",
55 (u64)hose->mem_resources[i].start,
56 (u64)hose->mem_resources[i].end
57 - (u64)hose->mem_resources[i].start + 1);
58 out_be32(&pci->pow[i+1].potar, (pci_addr_start >> 12));
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080059 out_be32(&pci->pow[i+1].potear, 0);
60 out_be32(&pci->pow[i+1].powbar,
Kumar Gala72b122c2008-01-14 17:02:19 -060061 (hose->mem_resources[i].start >> 12));
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080062 /* Enable, Mem R/W */
63 out_be32(&pci->pow[i+1].powar, 0x80044000
64 | (__ilog2(hose->mem_resources[i].end
65 - hose->mem_resources[i].start + 1) - 1));
66 }
Jon Loeligerb809b3e2006-06-17 17:52:48 -050067
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080068 /* Setup outbound IO window */
69 if (hose->io_resource.flags & IORESOURCE_IO){
Kumar Gala72b122c2008-01-14 17:02:19 -060070 pr_debug("PCI IO resource start 0x%016llx, size 0x%016llx, "
71 "phy base 0x%016llx.\n",
72 (u64)hose->io_resource.start,
73 (u64)hose->io_resource.end - (u64)hose->io_resource.start + 1,
74 (u64)hose->io_base_phys);
75 out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12));
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080076 out_be32(&pci->pow[i+1].potear, 0);
Kumar Gala72b122c2008-01-14 17:02:19 -060077 out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12));
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080078 /* Enable, IO R/W */
79 out_be32(&pci->pow[i+1].powar, 0x80088000
80 | (__ilog2(hose->io_resource.end
81 - hose->io_resource.start + 1) - 1));
82 }
Jon Loeligerb809b3e2006-06-17 17:52:48 -050083
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080084 /* Setup 2G inbound Memory Window @ 1 */
85 out_be32(&pci->piw[2].pitar, 0x00000000);
86 out_be32(&pci->piw[2].piwbar,0x00000000);
87 out_be32(&pci->piw[2].piwar, PIWAR_2G);
Jon Loeligerb809b3e2006-06-17 17:52:48 -050088}
89
Anton Vorontsovc9dadff2008-12-29 19:40:32 +030090static void __init setup_pci_cmd(struct pci_controller *hose)
Jon Loeligerb809b3e2006-06-17 17:52:48 -050091{
Jon Loeligerb809b3e2006-06-17 17:52:48 -050092 u16 cmd;
Kumar Galaeb12af42007-07-20 16:29:09 -050093 int cap_x;
94
Jon Loeligerb809b3e2006-06-17 17:52:48 -050095 early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
96 cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +080097 | PCI_COMMAND_IO;
Jon Loeligerb809b3e2006-06-17 17:52:48 -050098 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd);
Kumar Galaeb12af42007-07-20 16:29:09 -050099
100 cap_x = early_find_capability(hose, 0, 0, PCI_CAP_ID_PCIX);
101 if (cap_x) {
102 int pci_x_cmd = cap_x + PCI_X_CMD;
103 cmd = PCI_X_CMD_MAX_SPLIT | PCI_X_CMD_MAX_READ
104 | PCI_X_CMD_ERO | PCI_X_CMD_DPERR_E;
105 early_write_config_word(hose, 0, 0, pci_x_cmd, cmd);
106 } else {
107 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
108 }
Kumar Gala9ad494f2006-06-28 00:37:45 -0500109}
110
Anton Vorontsov692d1032008-05-23 17:41:02 +0400111static void __init setup_pci_pcsrbar(struct pci_controller *hose)
Jason Jin34e36c12008-05-23 16:32:46 +0800112{
Anton Vorontsov692d1032008-05-23 17:41:02 +0400113#ifdef CONFIG_PCI_MSI
Jason Jin34e36c12008-05-23 16:32:46 +0800114 phys_addr_t immr_base;
115
116 immr_base = get_immrbase();
117 early_write_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_0, immr_base);
Jason Jin34e36c12008-05-23 16:32:46 +0800118#endif
Anton Vorontsov692d1032008-05-23 17:41:02 +0400119}
Jason Jin34e36c12008-05-23 16:32:46 +0800120
Kumar Gala72b122c2008-01-14 17:02:19 -0600121static int fsl_pcie_bus_fixup;
Zhang Wei20243c72007-06-26 18:22:40 -0500122
Kumar Gala72b122c2008-01-14 17:02:19 -0600123static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
124{
Kumar Gala957ecff2007-07-11 13:31:58 -0500125 /* if we aren't a PCIe don't bother */
126 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
127 return ;
128
Kumar Gala72b122c2008-01-14 17:02:19 -0600129 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
130 fsl_pcie_bus_fixup = 1;
131 return ;
Zhang Wei20243c72007-06-26 18:22:40 -0500132}
133
Anton Vorontsovc9dadff2008-12-29 19:40:32 +0300134static int __init fsl_pcie_check_link(struct pci_controller *hose)
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800135{
Kumar Gala2fce12252007-10-03 23:37:33 -0500136 u32 val;
137 early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val);
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800138 if (val < PCIE_LTSSM_L0)
139 return 1;
140 return 0;
141}
Zhang Wei20243c72007-06-26 18:22:40 -0500142
Kumar Gala6c0a11c2007-07-19 15:29:53 -0500143void fsl_pcibios_fixup_bus(struct pci_bus *bus)
144{
145 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
146 int i;
147
Kumar Gala72b122c2008-01-14 17:02:19 -0600148 if ((bus->parent == hose->bus) &&
149 ((fsl_pcie_bus_fixup &&
150 early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
151 (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
152 {
153 for (i = 0; i < 4; ++i) {
154 struct resource *res = bus->resource[i];
155 struct resource *par = bus->parent->resource[i];
156 if (res) {
157 res->start = 0;
158 res->end = 0;
159 res->flags = 0;
160 }
161 if (res && par) {
162 res->start = par->start;
163 res->end = par->end;
164 res->flags = par->flags;
165 }
Kumar Gala6c0a11c2007-07-19 15:29:53 -0500166 }
167 }
168}
169
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800170int __init fsl_add_bridge(struct device_node *dev, int is_primary)
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500171{
172 int len;
173 struct pci_controller *hose;
174 struct resource rsrc;
Jeremy Kerr8efca492006-07-12 15:39:42 +1000175 const int *bus_range;
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500176
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800177 pr_debug("Adding PCI host bridge %s\n", dev->full_name);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500178
179 /* Fetch host bridge registers address */
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800180 if (of_address_to_resource(dev, 0, &rsrc)) {
181 printk(KERN_WARNING "Can't get pci register base!");
182 return -ENOMEM;
183 }
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500184
185 /* Get bus range if any */
Stephen Rothwelle2eb6392007-04-03 22:26:41 +1000186 bus_range = of_get_property(dev, "bus-range", &len);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500187 if (bus_range == NULL || len < 2 * sizeof(int))
188 printk(KERN_WARNING "Can't get bus-range for %s, assume"
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800189 " bus 0\n", dev->full_name);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500190
Josh Boyer7fe519c2008-12-11 09:46:44 +0000191 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS);
Kumar Galadbf84712007-06-27 01:56:50 -0500192 hose = pcibios_alloc_controller(dev);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500193 if (!hose)
194 return -ENOMEM;
Kumar Galadbf84712007-06-27 01:56:50 -0500195
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500196 hose->first_busno = bus_range ? bus_range[0] : 0x0;
Zhang Weibf7c0362007-05-22 11:38:26 +0800197 hose->last_busno = bus_range ? bus_range[1] : 0xff;
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500198
Kumar Gala2e56ff22007-07-19 16:07:35 -0500199 setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4,
200 PPC_INDIRECT_TYPE_BIG_ENDIAN);
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800201 setup_pci_cmd(hose);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500202
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800203 /* check PCI express link status */
Kumar Gala957ecff2007-07-11 13:31:58 -0500204 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
Kumar Gala7659c032007-07-25 00:29:53 -0500205 hose->indirect_type |= PPC_INDIRECT_TYPE_EXT_REG |
Kumar Gala957ecff2007-07-11 13:31:58 -0500206 PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800207 if (fsl_pcie_check_link(hose))
Kumar Gala957ecff2007-07-11 13:31:58 -0500208 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
209 }
Zhang Weie4725c22007-06-25 15:21:10 -0500210
joe@perches.comdf3c9012007-11-20 12:47:55 +1100211 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800212 "Firmware bus number: %d->%d\n",
213 (unsigned long long)rsrc.start, hose->first_busno,
214 hose->last_busno);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500215
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800216 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500217 hose, hose->cfg_addr, hose->cfg_data);
218
219 /* Interpret the "ranges" property */
220 /* This also maps the I/O region and sets isa_io/mem_base */
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800221 pci_process_bridge_OF_ranges(hose, dev, is_primary);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500222
223 /* Setup PEX window registers */
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800224 setup_pci_atmu(hose, &rsrc);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500225
Jason Jin34e36c12008-05-23 16:32:46 +0800226 /* Setup PEXCSRBAR */
Jason Jin34e36c12008-05-23 16:32:46 +0800227 setup_pci_pcsrbar(hose);
Jon Loeligerb809b3e2006-06-17 17:52:48 -0500228 return 0;
229}
Zang Roy-r619119ac4dd32007-07-10 18:46:35 +0800230
Kumar Gala72b122c2008-01-14 17:02:19 -0600231DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_header);
232DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_header);
233DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_header);
234DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_header);
235DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_header);
236DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_header);
237DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_header);
238DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_header);
239DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_header);
240DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_header);
241DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_header);
242DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_header);
243DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_header);
244DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_header);
245DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_header);
246DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_header);
247DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_header);
Kumar Gala2f3804e2008-07-02 01:36:15 -0500248DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8536E, quirk_fsl_pcie_header);
249DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8536, quirk_fsl_pcie_header);
Kumar Gala72b122c2008-01-14 17:02:19 -0600250DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
251DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
252DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
John Rigby76fe1ff2008-06-26 11:07:57 -0600253#endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
254
John Rigby35225802008-10-07 15:13:18 -0600255#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
John Rigby76fe1ff2008-06-26 11:07:57 -0600256int __init mpc83xx_add_bridge(struct device_node *dev)
257{
258 int len;
259 struct pci_controller *hose;
John Rigby5b70a092008-10-07 13:00:18 -0600260 struct resource rsrc_reg;
261 struct resource rsrc_cfg;
John Rigby76fe1ff2008-06-26 11:07:57 -0600262 const int *bus_range;
John Rigby5b70a092008-10-07 13:00:18 -0600263 int primary;
John Rigby76fe1ff2008-06-26 11:07:57 -0600264
265 pr_debug("Adding PCI host bridge %s\n", dev->full_name);
266
267 /* Fetch host bridge registers address */
John Rigby5b70a092008-10-07 13:00:18 -0600268 if (of_address_to_resource(dev, 0, &rsrc_reg)) {
269 printk(KERN_WARNING "Can't get pci register base!\n");
270 return -ENOMEM;
271 }
272
273 memset(&rsrc_cfg, 0, sizeof(rsrc_cfg));
274
275 if (of_address_to_resource(dev, 1, &rsrc_cfg)) {
276 printk(KERN_WARNING
277 "No pci config register base in dev tree, "
278 "using default\n");
279 /*
280 * MPC83xx supports up to two host controllers
281 * one at 0x8500 has config space registers at 0x8300
282 * one at 0x8600 has config space registers at 0x8380
283 */
284 if ((rsrc_reg.start & 0xfffff) == 0x8500)
285 rsrc_cfg.start = (rsrc_reg.start & 0xfff00000) + 0x8300;
286 else if ((rsrc_reg.start & 0xfffff) == 0x8600)
287 rsrc_cfg.start = (rsrc_reg.start & 0xfff00000) + 0x8380;
288 }
289 /*
290 * Controller at offset 0x8500 is primary
291 */
292 if ((rsrc_reg.start & 0xfffff) == 0x8500)
293 primary = 1;
294 else
295 primary = 0;
John Rigby76fe1ff2008-06-26 11:07:57 -0600296
297 /* Get bus range if any */
298 bus_range = of_get_property(dev, "bus-range", &len);
299 if (bus_range == NULL || len < 2 * sizeof(int)) {
300 printk(KERN_WARNING "Can't get bus-range for %s, assume"
301 " bus 0\n", dev->full_name);
302 }
303
Josh Boyer7fe519c2008-12-11 09:46:44 +0000304 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS);
John Rigby76fe1ff2008-06-26 11:07:57 -0600305 hose = pcibios_alloc_controller(dev);
306 if (!hose)
307 return -ENOMEM;
308
309 hose->first_busno = bus_range ? bus_range[0] : 0;
310 hose->last_busno = bus_range ? bus_range[1] : 0xff;
311
John Rigby5b70a092008-10-07 13:00:18 -0600312 setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0);
John Rigby76fe1ff2008-06-26 11:07:57 -0600313
John Rigby35225802008-10-07 15:13:18 -0600314 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
John Rigby76fe1ff2008-06-26 11:07:57 -0600315 "Firmware bus number: %d->%d\n",
John Rigby5b70a092008-10-07 13:00:18 -0600316 (unsigned long long)rsrc_reg.start, hose->first_busno,
John Rigby76fe1ff2008-06-26 11:07:57 -0600317 hose->last_busno);
318
319 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
320 hose, hose->cfg_addr, hose->cfg_data);
321
322 /* Interpret the "ranges" property */
323 /* This also maps the I/O region and sets isa_io/mem_base */
324 pci_process_bridge_OF_ranges(hose, dev, primary);
325
326 return 0;
327}
328#endif /* CONFIG_PPC_83xx */