aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_common.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-21 21:18:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-24 02:15:07 -0400
commite87dc35020bc555969810452f44bceaf8394eafa (patch)
treeb58f14d41f8e147f6ddc2d9657a88813fdb73bdf /arch/sparc64/kernel/pci_common.c
parentaaf7cec2769942035985716452107fc5ba0b11f6 (diff)
[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.c15
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,
664 } 664 }
665 pdev = pbus; 665 pdev = pbus;
666 666
667 if (cnode == pbm->prom_node) 667 if (cnode == pbm->prom_node->node)
668 break; 668 break;
669 } 669 }
670 670
@@ -680,7 +680,7 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
680 int i, cnode, plen; 680 int i, cnode, plen;
681 681
682 cnode = pci_intmap_match_to_root(pbm, pdev, interrupt); 682 cnode = pci_intmap_match_to_root(pbm, pdev, interrupt);
683 if (cnode == pbm->prom_node) 683 if (cnode == pbm->prom_node->node)
684 goto success; 684 goto success;
685 685
686 plen = prom_getproperty(cnode, "reg", (char *) reg, sizeof(reg)); 686 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
691 goto fail; 691 goto fail;
692 } 692 }
693 693
694 hi = reg[0].phys_hi & pbm->pbm_intmask.phys_hi; 694 hi = reg[0].phys_hi & pbm->pbm_intmask->phys_hi;
695 mid = reg[0].phys_mid & pbm->pbm_intmask.phys_mid; 695 mid = reg[0].phys_mid & pbm->pbm_intmask->phys_mid;
696 lo = reg[0].phys_lo & pbm->pbm_intmask.phys_lo; 696 lo = reg[0].phys_lo & pbm->pbm_intmask->phys_lo;
697 irq = *interrupt & pbm->pbm_intmask.interrupt; 697 irq = *interrupt & pbm->pbm_intmask->interrupt;
698 698
699 for (i = 0; i < pbm->num_pbm_intmap; i++) { 699 for (i = 0; i < pbm->num_pbm_intmap; i++) {
700 struct linux_prom_pci_intmap *intmap; 700 struct linux_prom_pci_intmap *intmap;
@@ -714,7 +714,8 @@ fail:
714 return 0; 714 return 0;
715 715
716success: 716success:
717 printk("PCI-IRQ: Routing bus[%2x] slot[%2x] to INO[%02x]\n", 717 printk("%s: Routing bus[%2x] slot[%2x] to INO[%02x]\n",
718 pbm->name,
718 pdev->bus->number, PCI_SLOT(pdev->devfn), 719 pdev->bus->number, PCI_SLOT(pdev->devfn),
719 *interrupt); 720 *interrupt);
720 return 1; 721 return 1;