aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/82xx
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-08-28 04:47:54 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-13 11:33:20 -0400
commit52964f87c64e6c6ea671b5bf3030fb1494090a48 (patch)
tree2e20d81bc05b60b7108733daf5713ea640ad2477 /arch/powerpc/platforms/82xx
parent0ae0b54565a8dcc2b98de694b998e765de15b713 (diff)
[POWERPC] Add an optional device_node pointer to the irq_host
The majority of irq_host implementations (3 out of 4) are associated with a device_node, and need to stash it somewhere. Rather than having it somewhere different for each host, add an optional device_node pointer to the irq_host structure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/82xx')
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index c0a0c56ac5b3..91ddbd2f477d 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -61,7 +61,6 @@ static struct {
61 61
62static unsigned long pci_int_base; 62static unsigned long pci_int_base;
63static struct irq_host *pci_pic_host; 63static struct irq_host *pci_pic_host;
64static struct device_node *pci_pic_node;
65#endif 64#endif
66 65
67static void __init mpc82xx_ads_pic_init(void) 66static void __init mpc82xx_ads_pic_init(void)
@@ -401,7 +400,7 @@ m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc)
401 400
402static int pci_pic_host_match(struct irq_host *h, struct device_node *node) 401static int pci_pic_host_match(struct irq_host *h, struct device_node *node)
403{ 402{
404 return node == pci_pic_node; 403 return h->of_node == node;
405} 404}
406 405
407static int pci_pic_host_map(struct irq_host *h, unsigned int virq, 406static int pci_pic_host_map(struct irq_host *h, unsigned int virq,
@@ -478,7 +477,6 @@ void m82xx_pci_init_irq(void)
478 iounmap(immap); 477 iounmap(immap);
479 return; 478 return;
480 } 479 }
481 pci_pic_node = of_node_get(np);
482 /* PCI interrupt controller registers: status and mask */ 480 /* PCI interrupt controller registers: status and mask */
483 regs = of_get_property(np, "reg", &size); 481 regs = of_get_property(np, "reg", &size);
484 if ((!regs) || (size <= 2)) { 482 if ((!regs) || (size <= 2)) {
@@ -490,7 +488,6 @@ void m82xx_pci_init_irq(void)
490 ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg)); 488 ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg));
491 pci_regs.pci_int_mask_reg = 489 pci_regs.pci_int_mask_reg =
492 ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg)); 490 ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg));
493 of_node_put(np);
494 /* configure chip select for PCI interrupt controller */ 491 /* configure chip select for PCI interrupt controller */
495 immap->im_memctl.memc_br3 = regs[0] | 0x00001801; 492 immap->im_memctl.memc_br3 = regs[0] | 0x00001801;
496 immap->im_memctl.memc_or3 = 0xffff8010; 493 immap->im_memctl.memc_or3 = 0xffff8010;
@@ -501,7 +498,7 @@ void m82xx_pci_init_irq(void)
501 *pci_regs.pci_int_mask_reg |= 0xfff00000; 498 *pci_regs.pci_int_mask_reg |= 0xfff00000;
502 iounmap(immap); 499 iounmap(immap);
503 pci_pic_host = 500 pci_pic_host =
504 irq_alloc_host(IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1, 501 irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1,
505 &pci_pic_host_ops, irq_max + 1); 502 &pci_pic_host_ops, irq_max + 1);
506 return; 503 return;
507} 504}