aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mpc8xxx.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-02-14 16:06:54 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-02-16 08:11:22 -0500
commita8db8cf0d894df5f1dcfd4bce9894e0dbcc01c96 (patch)
treef9f2c53c57eeb04e5df60671951bcf4f2ca4966e /drivers/gpio/gpio-mpc8xxx.c
parent68700650e71b6bb6636673f4f9c8ec807353d8d6 (diff)
irq_domain: Replace irq_alloc_host() with revmap-specific initializers
Each revmap type has different arguments for setting up the revmap. This patch splits up the generator functions so that each revmap type can do its own setup and the user doesn't need to keep track of how each revmap type handles the arguments. This patch also adds a host_data argument to the generators. There are cases where the host_data pointer will be needed before the function returns. ie. the legacy map calls the .map callback for each irq before returning. v2: - Add void *host_data argument to irq_domain_add_*() functions - fixed failure to compile - Moved IRQ_DOMAIN_MAP_* defines into irqdomain.c Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/gpio/gpio-mpc8xxx.c')
-rw-r--r--drivers/gpio/gpio-mpc8xxx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index 9efd59732eeb..149d9876fca8 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -364,9 +364,8 @@ static void __init mpc8xxx_add_controller(struct device_node *np)
364 if (hwirq == NO_IRQ) 364 if (hwirq == NO_IRQ)
365 goto skip_irq; 365 goto skip_irq;
366 366
367 mpc8xxx_gc->irq = 367 mpc8xxx_gc->irq = irq_domain_add_linear(np, MPC8XXX_GPIO_PINS,
368 irq_alloc_host(np, IRQ_DOMAIN_MAP_LINEAR, MPC8XXX_GPIO_PINS, 368 &mpc8xxx_gpio_irq_ops, mpc8xxx_gc);
369 &mpc8xxx_gpio_irq_ops, MPC8XXX_GPIO_PINS);
370 if (!mpc8xxx_gc->irq) 369 if (!mpc8xxx_gc->irq)
371 goto skip_irq; 370 goto skip_irq;
372 371
@@ -374,8 +373,6 @@ static void __init mpc8xxx_add_controller(struct device_node *np)
374 if (id) 373 if (id)
375 mpc8xxx_gc->of_dev_id_data = id->data; 374 mpc8xxx_gc->of_dev_id_data = id->data;
376 375
377 mpc8xxx_gc->irq->host_data = mpc8xxx_gc;
378
379 /* ack and mask all irqs */ 376 /* ack and mask all irqs */
380 out_be32(mm_gc->regs + GPIO_IER, 0xffffffff); 377 out_be32(mm_gc->regs + GPIO_IER, 0xffffffff);
381 out_be32(mm_gc->regs + GPIO_IMR, 0); 378 out_be32(mm_gc->regs + GPIO_IMR, 0);