aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/52xx
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/52xx
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/52xx')
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 8c464c55b5d0..1d793e4b8d56 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -244,7 +244,7 @@ static struct irq_chip mpc52xx_sdma_irqchip = {
244static int mpc52xx_irqhost_match(struct irq_host *h, struct device_node *node) 244static int mpc52xx_irqhost_match(struct irq_host *h, struct device_node *node)
245{ 245{
246 pr_debug("%s: node=%p\n", __func__, node); 246 pr_debug("%s: node=%p\n", __func__, node);
247 return mpc52xx_irqhost->host_data == node; 247 return h->of_node == node;
248} 248}
249 249
250static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, 250static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct,
@@ -419,14 +419,13 @@ void __init mpc52xx_init_irq(void)
419 * hw irq information provided by the ofw to linux virq 419 * hw irq information provided by the ofw to linux virq
420 */ 420 */
421 421
422 mpc52xx_irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 422 mpc52xx_irqhost = irq_alloc_host(picnode, IRQ_HOST_MAP_LINEAR,
423 MPC52xx_IRQ_HIGHTESTHWIRQ, 423 MPC52xx_IRQ_HIGHTESTHWIRQ,
424 &mpc52xx_irqhost_ops, -1); 424 &mpc52xx_irqhost_ops, -1);
425 425
426 if (!mpc52xx_irqhost) 426 if (!mpc52xx_irqhost)
427 panic(__FILE__ ": Cannot allocate the IRQ host\n"); 427 panic(__FILE__ ": Cannot allocate the IRQ host\n");
428 428
429 mpc52xx_irqhost->host_data = picnode;
430 printk(KERN_INFO "MPC52xx PIC is up and running!\n"); 429 printk(KERN_INFO "MPC52xx PIC is up and running!\n");
431} 430}
432 431