diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-12-06 09:56:55 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-10 21:42:28 -0500 |
commit | 3b32c162bb2be2075508cdc2260e6a6853335581 (patch) | |
tree | 26ab408fd3aa0dde64c3442d03d5d685dd662a97 | |
parent | 2cd1008cf56371404055fbc7d59f6da060af16fa (diff) |
[POWERPC] iSeries: Reduce dependence on pci_dn bussubno
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index b46d8c5709f2..7e00e35b86d0 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -190,6 +190,7 @@ void __init iSeries_pci_final_fixup(void) | |||
190 | for_each_pci_dev(pdev) { | 190 | for_each_pci_dev(pdev) { |
191 | struct pci_dn *pdn; | 191 | struct pci_dn *pdn; |
192 | const u32 *agent; | 192 | const u32 *agent; |
193 | const u32 *sub_bus; | ||
193 | 194 | ||
194 | node = find_device_node(pdev->bus->number, pdev->devfn); | 195 | node = find_device_node(pdev->bus->number, pdev->devfn); |
195 | printk("pci dev %p (%x.%x), node %p\n", pdev, | 196 | printk("pci dev %p (%x.%x), node %p\n", pdev, |
@@ -202,23 +203,23 @@ void __init iSeries_pci_final_fixup(void) | |||
202 | 203 | ||
203 | pdn = PCI_DN(node); | 204 | pdn = PCI_DN(node); |
204 | agent = of_get_property(node, "linux,agent-id", NULL); | 205 | agent = of_get_property(node, "linux,agent-id", NULL); |
205 | if (pdn && agent) { | 206 | sub_bus = of_get_property(node, "linux,subbus", NULL); |
206 | u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, | 207 | if (pdn && agent && sub_bus) { |
207 | pdn->bussubno); | 208 | u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, *sub_bus); |
208 | int err; | 209 | int err; |
209 | 210 | ||
210 | err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno, | 211 | err = HvCallXm_connectBusUnit(pdn->busno, *sub_bus, |
211 | *agent, irq); | 212 | *agent, irq); |
212 | if (err) | 213 | if (err) |
213 | pci_log_error("Connect Bus Unit", | 214 | pci_log_error("Connect Bus Unit", |
214 | pdn->busno, pdn->bussubno, *agent, err); | 215 | pdn->busno, *sub_bus, *agent, err); |
215 | else { | 216 | else { |
216 | err = HvCallPci_configStore8(pdn->busno, | 217 | err = HvCallPci_configStore8(pdn->busno, |
217 | pdn->bussubno, *agent, | 218 | *sub_bus, *agent, |
218 | PCI_INTERRUPT_LINE, irq); | 219 | PCI_INTERRUPT_LINE, irq); |
219 | if (err) | 220 | if (err) |
220 | pci_log_error("PciCfgStore Irq Failed!", | 221 | pci_log_error("PciCfgStore Irq Failed!", |
221 | pdn->busno, pdn->bussubno, | 222 | pdn->busno, *sub_bus, |
222 | *agent, err); | 223 | *agent, err); |
223 | else | 224 | else |
224 | pdev->irq = irq; | 225 | pdev->irq = irq; |
@@ -229,8 +230,7 @@ void __init iSeries_pci_final_fixup(void) | |||
229 | pdev->sysdata = node; | 230 | pdev->sysdata = node; |
230 | PCI_DN(node)->pcidev = pdev; | 231 | PCI_DN(node)->pcidev = pdev; |
231 | allocate_device_bars(pdev); | 232 | allocate_device_bars(pdev); |
232 | iSeries_Device_Information(pdev, num_dev, pdn->busno, | 233 | iSeries_Device_Information(pdev, num_dev, pdn->busno, *sub_bus); |
233 | pdn->bussubno); | ||
234 | iommu_devnode_init_iSeries(pdev, node); | 234 | iommu_devnode_init_iSeries(pdev, node); |
235 | } | 235 | } |
236 | iSeries_activate_IRQs(); | 236 | iSeries_activate_IRQs(); |