summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/82xx
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-08-28 18:47:54 +1000
committerPaul Mackerras <paulus@samba.org>2007-09-14 01:33:20 +1000
commit52964f87c64e6c6ea671b5bf3030fb1494090a48 (patch)
tree2e20d81bc05b60b7108733daf5713ea640ad2477 /arch/powerpc/platforms/82xx
parent0ae0b54565a8dcc2b98de694b998e765de15b713 (diff)
downloadlinux-52964f87c64e6c6ea671b5bf3030fb1494090a48.tar.gz
linux-52964f87c64e6c6ea671b5bf3030fb1494090a48.tar.bz2
linux-52964f87c64e6c6ea671b5bf3030fb1494090a48.zip
[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 {
static unsigned long pci_int_base;
static struct irq_host *pci_pic_host;
-static struct device_node *pci_pic_node;
#endif
static void __init mpc82xx_ads_pic_init(void)
@@ -401,7 +400,7 @@ m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc)
static int pci_pic_host_match(struct irq_host *h, struct device_node *node)
{
- return node == pci_pic_node;
+ return h->of_node == node;
}
static int pci_pic_host_map(struct irq_host *h, unsigned int virq,
@@ -478,7 +477,6 @@ void m82xx_pci_init_irq(void)
iounmap(immap);
return;
}
- pci_pic_node = of_node_get(np);
/* PCI interrupt controller registers: status and mask */
regs = of_get_property(np, "reg", &size);
if ((!regs) || (size <= 2)) {
@@ -490,7 +488,6 @@ void m82xx_pci_init_irq(void)
ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg));
pci_regs.pci_int_mask_reg =
ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg));
- of_node_put(np);
/* configure chip select for PCI interrupt controller */
immap->im_memctl.memc_br3 = regs[0] | 0x00001801;
immap->im_memctl.memc_or3 = 0xffff8010;
@@ -501,7 +498,7 @@ void m82xx_pci_init_irq(void)
*pci_regs.pci_int_mask_reg |= 0xfff00000;
iounmap(immap);
pci_pic_host =
- irq_alloc_host(IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1,
+ irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1,
&pci_pic_host_ops, irq_max + 1);
return;
}