Commit 3f178632 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Paul Mackerras

[POWERPC] iSeries: Unindent and clean iSeries_pci_final_fixup

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 6a905793
...@@ -177,16 +177,21 @@ void __init iSeries_pci_final_fixup(void) ...@@ -177,16 +177,21 @@ void __init iSeries_pci_final_fixup(void)
printk("pcibios_final_fixup\n"); printk("pcibios_final_fixup\n");
for_each_pci_dev(pdev) { for_each_pci_dev(pdev) {
struct pci_dn *pdn;
const u32 *agent;
node = find_device_node(pdev->bus->number, pdev->devfn); node = find_device_node(pdev->bus->number, pdev->devfn);
printk("pci dev %p (%x.%x), node %p\n", pdev, printk("pci dev %p (%x.%x), node %p\n", pdev,
pdev->bus->number, pdev->devfn, node); pdev->bus->number, pdev->devfn, node);
if (!node) {
printk("PCI: Device Tree not found for 0x%016lX\n",
(unsigned long)pdev);
continue;
}
if (node != NULL) { pdn = PCI_DN(node);
struct pci_dn *pdn = PCI_DN(node);
const u32 *agent;
agent = of_get_property(node, "linux,agent-id", NULL); agent = of_get_property(node, "linux,agent-id", NULL);
if ((pdn != NULL) && (agent != NULL)) { if (pdn && agent) {
u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
pdn->bussubno); pdn->bussubno);
int err; int err;
...@@ -197,27 +202,24 @@ void __init iSeries_pci_final_fixup(void) ...@@ -197,27 +202,24 @@ void __init iSeries_pci_final_fixup(void)
pci_log_error("Connect Bus Unit", pci_log_error("Connect Bus Unit",
pdn->busno, pdn->bussubno, *agent, err); pdn->busno, pdn->bussubno, *agent, err);
else { else {
err = HvCallPci_configStore8(pdn->busno, pdn->bussubno, err = HvCallPci_configStore8(pdn->busno,
*agent, pdn->bussubno, *agent,
PCI_INTERRUPT_LINE, PCI_INTERRUPT_LINE, irq);
irq);
if (err) if (err)
pci_log_error("PciCfgStore Irq Failed!", pci_log_error("PciCfgStore Irq Failed!",
pdn->busno, pdn->bussubno, *agent, err); pdn->busno, pdn->bussubno,
} *agent, err);
if (!err) else
pdev->irq = irq; pdev->irq = irq;
} }
}
++num_dev; num_dev++;
pdev->sysdata = node; pdev->sysdata = node;
PCI_DN(node)->pcidev = pdev; PCI_DN(node)->pcidev = pdev;
allocate_device_bars(pdev); allocate_device_bars(pdev);
iSeries_Device_Information(pdev, num_dev); iSeries_Device_Information(pdev, num_dev);
iommu_devnode_init_iSeries(pdev, node); iommu_devnode_init_iSeries(pdev, node);
} else
printk("PCI: Device Tree not found for 0x%016lX\n",
(unsigned long)pdev);
} }
iSeries_activate_IRQs(); iSeries_activate_IRQs();
mf_display_src(0xC9000200); mf_display_src(0xC9000200);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment