diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-21 18:18:47 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-23 23:15:07 -0700 |
commit | e87dc35020bc555969810452f44bceaf8394eafa (patch) | |
tree | b58f14d41f8e147f6ddc2d9657a88813fdb73bdf /arch/sparc64/kernel/pci_common.c | |
parent | aaf7cec2769942035985716452107fc5ba0b11f6 (diff) | |
download | blackbird-op-linux-e87dc35020bc555969810452f44bceaf8394eafa.tar.gz blackbird-op-linux-e87dc35020bc555969810452f44bceaf8394eafa.zip |
[SPARC64]: Use in-kernel OBP device tree for PCI controller probing.
It can be pushed even further down, but this is a first step.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_common.c')
-rw-r--r-- | arch/sparc64/kernel/pci_common.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index 33dedb1aacd4..fc71b28795a0 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c @@ -664,7 +664,7 @@ static unsigned int __init pci_intmap_match_to_root(struct pci_pbm_info *pbm, } pdev = pbus; - if (cnode == pbm->prom_node) + if (cnode == pbm->prom_node->node) break; } @@ -680,7 +680,7 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt int i, cnode, plen; cnode = pci_intmap_match_to_root(pbm, pdev, interrupt); - if (cnode == pbm->prom_node) + if (cnode == pbm->prom_node->node) goto success; plen = prom_getproperty(cnode, "reg", (char *) reg, sizeof(reg)); @@ -691,10 +691,10 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt goto fail; } - hi = reg[0].phys_hi & pbm->pbm_intmask.phys_hi; - mid = reg[0].phys_mid & pbm->pbm_intmask.phys_mid; - lo = reg[0].phys_lo & pbm->pbm_intmask.phys_lo; - irq = *interrupt & pbm->pbm_intmask.interrupt; + hi = reg[0].phys_hi & pbm->pbm_intmask->phys_hi; + mid = reg[0].phys_mid & pbm->pbm_intmask->phys_mid; + lo = reg[0].phys_lo & pbm->pbm_intmask->phys_lo; + irq = *interrupt & pbm->pbm_intmask->interrupt; for (i = 0; i < pbm->num_pbm_intmap; i++) { struct linux_prom_pci_intmap *intmap; @@ -714,7 +714,8 @@ fail: return 0; success: - printk("PCI-IRQ: Routing bus[%2x] slot[%2x] to INO[%02x]\n", + printk("%s: Routing bus[%2x] slot[%2x] to INO[%02x]\n", + pbm->name, pdev->bus->number, PCI_SLOT(pdev->devfn), *interrupt); return 1; |