[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>
This commit is contained in:
parent
96ff6afaf1
commit
b025279316
@ -190,9 +190,6 @@ void iSeries_pcibios_init(void)
|
|||||||
/* Find and connect the devices. */
|
/* Find and connect the devices. */
|
||||||
for (dn = NULL; (dn = of_get_next_child(node, dn)) != NULL;) {
|
for (dn = NULL; (dn = of_get_next_child(node, dn)) != NULL;) {
|
||||||
struct pci_dn *pdn;
|
struct pci_dn *pdn;
|
||||||
u8 irq;
|
|
||||||
int err;
|
|
||||||
u32 *agent;
|
|
||||||
u32 *reg;
|
u32 *reg;
|
||||||
u32 *lsn;
|
u32 *lsn;
|
||||||
|
|
||||||
@ -206,11 +203,6 @@ void iSeries_pcibios_init(void)
|
|||||||
printk(KERN_DEBUG "no subbus property!\n");
|
printk(KERN_DEBUG "no subbus property!\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
agent = (u32 *)get_property(dn, "linux,agent-id", NULL);
|
|
||||||
if (agent == NULL) {
|
|
||||||
printk(KERN_DEBUG "no agent-id\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
lsn = (u32 *)get_property(dn,
|
lsn = (u32 *)get_property(dn,
|
||||||
"linux,logical-slot-number", NULL);
|
"linux,logical-slot-number", NULL);
|
||||||
if (lsn == NULL) {
|
if (lsn == NULL) {
|
||||||
@ -218,21 +210,6 @@ void iSeries_pcibios_init(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = iSeries_allocate_IRQ(bus, 0, *busp);
|
|
||||||
err = HvCallXm_connectBusUnit(bus, *busp, *agent, irq);
|
|
||||||
if (err) {
|
|
||||||
pci_Log_Error("Connect Bus Unit",
|
|
||||||
bus, *busp, *agent, err);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
err = HvCallPci_configStore8(bus, *busp, *agent,
|
|
||||||
PCI_INTERRUPT_LINE, irq);
|
|
||||||
if (err) {
|
|
||||||
pci_Log_Error("PciCfgStore Irq Failed!",
|
|
||||||
bus, *busp, *agent, err);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
pdn = kzalloc(sizeof(*pdn), GFP_KERNEL);
|
pdn = kzalloc(sizeof(*pdn), GFP_KERNEL);
|
||||||
if (pdn == NULL)
|
if (pdn == NULL)
|
||||||
return;
|
return;
|
||||||
@ -241,7 +218,6 @@ void iSeries_pcibios_init(void)
|
|||||||
pdn->busno = bus;
|
pdn->busno = bus;
|
||||||
pdn->devfn = (reg[0] >> 8) & 0xff;
|
pdn->devfn = (reg[0] >> 8) & 0xff;
|
||||||
pdn->bussubno = *busp;
|
pdn->bussubno = *busp;
|
||||||
pdn->Irq = irq;
|
|
||||||
pdn->LogicalSlot = *lsn;
|
pdn->LogicalSlot = *lsn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -266,6 +242,34 @@ void __init iSeries_pci_final_fixup(void)
|
|||||||
pdev->bus->number, pdev->devfn, node);
|
pdev->bus->number, pdev->devfn, node);
|
||||||
|
|
||||||
if (node != NULL) {
|
if (node != NULL) {
|
||||||
|
struct pci_dn *pdn = PCI_DN(node);
|
||||||
|
u32 *agent;
|
||||||
|
|
||||||
|
agent = (u32 *)get_property(node, "linux,agent-id",
|
||||||
|
NULL);
|
||||||
|
if ((pdn != NULL) && (agent != NULL)) {
|
||||||
|
u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
|
||||||
|
pdn->bussubno);
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno,
|
||||||
|
*agent, irq);
|
||||||
|
if (err)
|
||||||
|
pci_Log_Error("Connect Bus Unit",
|
||||||
|
pdn->busno, pdn->bussubno, *agent, err);
|
||||||
|
else {
|
||||||
|
err = HvCallPci_configStore8(pdn->busno, pdn->bussubno,
|
||||||
|
*agent,
|
||||||
|
PCI_INTERRUPT_LINE,
|
||||||
|
irq);
|
||||||
|
if (err)
|
||||||
|
pci_Log_Error("PciCfgStore Irq Failed!",
|
||||||
|
pdn->busno, pdn->bussubno, *agent, err);
|
||||||
|
}
|
||||||
|
if (!err)
|
||||||
|
pdev->irq = irq;
|
||||||
|
}
|
||||||
|
|
||||||
++DeviceCount;
|
++DeviceCount;
|
||||||
pdev->sysdata = (void *)node;
|
pdev->sysdata = (void *)node;
|
||||||
PCI_DN(node)->pcidev = pdev;
|
PCI_DN(node)->pcidev = pdev;
|
||||||
@ -275,7 +279,6 @@ void __init iSeries_pci_final_fixup(void)
|
|||||||
} else
|
} else
|
||||||
printk("PCI: Device Tree not found for 0x%016lX\n",
|
printk("PCI: Device Tree not found for 0x%016lX\n",
|
||||||
(unsigned long)pdev);
|
(unsigned long)pdev);
|
||||||
pdev->irq = PCI_DN(node)->Irq;
|
|
||||||
}
|
}
|
||||||
iSeries_activate_IRQs();
|
iSeries_activate_IRQs();
|
||||||
mf_display_src(0xC9000200);
|
mf_display_src(0xC9000200);
|
||||||
|
@ -79,7 +79,6 @@ struct pci_dn {
|
|||||||
struct pci_dev *pcidev; /* back-pointer to the pci device */
|
struct pci_dev *pcidev; /* back-pointer to the pci device */
|
||||||
struct device_node *node; /* back-pointer to the device_node */
|
struct device_node *node; /* back-pointer to the device_node */
|
||||||
#ifdef CONFIG_PPC_ISERIES
|
#ifdef CONFIG_PPC_ISERIES
|
||||||
int Irq; /* Assigned IRQ */
|
|
||||||
int Flags; /* Possible flags(disable/bist)*/
|
int Flags; /* Possible flags(disable/bist)*/
|
||||||
u8 LogicalSlot; /* Hv Slot Index for Tces */
|
u8 LogicalSlot; /* Hv Slot Index for Tces */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user