diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-05-19 02:50:39 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-24 02:08:56 -0400 |
commit | b02527931672749d404b5f640b7e086afc37f4e0 (patch) | |
tree | 7f825ab2706441559a39710f360c1fb4c1073b85 /arch/powerpc/platforms/iseries/pci.c | |
parent | 96ff6afaf1c2fdd118139095dea66c0910379780 (diff) |
[PATCH] powerpc: remove Irq from pci_dn
As we now store enough information in the device_node to allocate the
irq number in pcibios_final_fixup.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries/pci.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 5bc08d4eef49..edaafbb817b7 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -190,9 +190,6 @@ void iSeries_pcibios_init(void) | |||
190 | /* Find and connect the devices. */ | 190 | /* Find and connect the devices. */ |
191 | for (dn = NULL; (dn = of_get_next_child(node, dn)) != NULL;) { | 191 | for (dn = NULL; (dn = of_get_next_child(node, dn)) != NULL;) { |
192 | struct pci_dn *pdn; | 192 | struct pci_dn *pdn; |
193 | u8 irq; | ||
194 | int err; | ||
195 | u32 *agent; | ||
196 | u32 *reg; | 193 | u32 *reg; |
197 | u32 *lsn; | 194 | u32 *lsn; |
198 | 195 | ||
@@ -206,11 +203,6 @@ void iSeries_pcibios_init(void) | |||
206 | printk(KERN_DEBUG "no subbus property!\n"); | 203 | printk(KERN_DEBUG "no subbus property!\n"); |
207 | continue; | 204 | continue; |
208 | } | 205 | } |
209 | agent = (u32 *)get_property(dn, "linux,agent-id", NULL); | ||
210 | if (agent == NULL) { | ||
211 | printk(KERN_DEBUG "no agent-id\n"); | ||
212 | continue; | ||
213 | } | ||
214 | lsn = (u32 *)get_property(dn, | 206 | lsn = (u32 *)get_property(dn, |
215 | "linux,logical-slot-number", NULL); | 207 | "linux,logical-slot-number", NULL); |
216 | if (lsn == NULL) { | 208 | if (lsn == NULL) { |
@@ -218,21 +210,6 @@ void iSeries_pcibios_init(void) | |||
218 | continue; | 210 | continue; |
219 | } | 211 | } |
220 | 212 | ||
221 | irq = iSeries_allocate_IRQ(bus, 0, *busp); | ||
222 | err = HvCallXm_connectBusUnit(bus, *busp, *agent, irq); | ||
223 | if (err) { | ||
224 | pci_Log_Error("Connect Bus Unit", | ||
225 | bus, *busp, *agent, err); | ||
226 | continue; | ||
227 | } | ||
228 | err = HvCallPci_configStore8(bus, *busp, *agent, | ||
229 | PCI_INTERRUPT_LINE, irq); | ||
230 | if (err) { | ||
231 | pci_Log_Error("PciCfgStore Irq Failed!", | ||
232 | bus, *busp, *agent, err); | ||
233 | continue; | ||
234 | } | ||
235 | |||
236 | pdn = kzalloc(sizeof(*pdn), GFP_KERNEL); | 213 | pdn = kzalloc(sizeof(*pdn), GFP_KERNEL); |
237 | if (pdn == NULL) | 214 | if (pdn == NULL) |
238 | return; | 215 | return; |
@@ -241,7 +218,6 @@ void iSeries_pcibios_init(void) | |||
241 | pdn->busno = bus; | 218 | pdn->busno = bus; |
242 | pdn->devfn = (reg[0] >> 8) & 0xff; | 219 | pdn->devfn = (reg[0] >> 8) & 0xff; |
243 | pdn->bussubno = *busp; | 220 | pdn->bussubno = *busp; |
244 | pdn->Irq = irq; | ||
245 | pdn->LogicalSlot = *lsn; | 221 | pdn->LogicalSlot = *lsn; |
246 | } | 222 | } |
247 | } | 223 | } |
@@ -266,6 +242,34 @@ void __init iSeries_pci_final_fixup(void) | |||
266 | pdev->bus->number, pdev->devfn, node); | 242 | pdev->bus->number, pdev->devfn, node); |
267 | 243 | ||
268 | if (node != NULL) { | 244 | if (node != NULL) { |
245 | struct pci_dn *pdn = PCI_DN(node); | ||
246 | u32 *agent; | ||
247 | |||
248 | agent = (u32 *)get_property(node, "linux,agent-id", | ||
249 | NULL); | ||
250 | if ((pdn != NULL) && (agent != NULL)) { | ||
251 | u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, | ||
252 | pdn->bussubno); | ||
253 | int err; | ||
254 | |||
255 | err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno, | ||
256 | *agent, irq); | ||
257 | if (err) | ||
258 | pci_Log_Error("Connect Bus Unit", | ||
259 | pdn->busno, pdn->bussubno, *agent, err); | ||
260 | else { | ||
261 | err = HvCallPci_configStore8(pdn->busno, pdn->bussubno, | ||
262 | *agent, | ||
263 | PCI_INTERRUPT_LINE, | ||
264 | irq); | ||
265 | if (err) | ||
266 | pci_Log_Error("PciCfgStore Irq Failed!", | ||
267 | pdn->busno, pdn->bussubno, *agent, err); | ||
268 | } | ||
269 | if (!err) | ||
270 | pdev->irq = irq; | ||
271 | } | ||
272 | |||
269 | ++DeviceCount; | 273 | ++DeviceCount; |
270 | pdev->sysdata = (void *)node; | 274 | pdev->sysdata = (void *)node; |
271 | PCI_DN(node)->pcidev = pdev; | 275 | PCI_DN(node)->pcidev = pdev; |
@@ -275,7 +279,6 @@ void __init iSeries_pci_final_fixup(void) | |||
275 | } else | 279 | } else |
276 | printk("PCI: Device Tree not found for 0x%016lX\n", | 280 | printk("PCI: Device Tree not found for 0x%016lX\n", |
277 | (unsigned long)pdev); | 281 | (unsigned long)pdev); |
278 | pdev->irq = PCI_DN(node)->Irq; | ||
279 | } | 282 | } |
280 | iSeries_activate_IRQs(); | 283 | iSeries_activate_IRQs(); |
281 | mf_display_src(0xC9000200); | 284 | mf_display_src(0xC9000200); |