diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-02-15 01:06:54 +0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-16 17:11:22 +0400 |
commit | a8db8cf0d894df5f1dcfd4bce9894e0dbcc01c96 (patch) | |
tree | f9f2c53c57eeb04e5df60671951bcf4f2ca4966e /arch/powerpc/platforms/embedded6xx | |
parent | 68700650e71b6bb6636673f4f9c8ec807353d8d6 (diff) | |
download | linux-a8db8cf0d894df5f1dcfd4bce9894e0dbcc01c96.tar.xz |
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 'arch/powerpc/platforms/embedded6xx')
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/flipper-pic.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerpc/platforms/embedded6xx/flipper-pic.c index f862361730fb..434597166ca4 100644 --- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c +++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c @@ -159,15 +159,13 @@ struct irq_domain * __init flipper_pic_init(struct device_node *np) __flipper_quiesce(io_base); - irq_domain = irq_alloc_host(np, IRQ_DOMAIN_MAP_LINEAR, FLIPPER_NR_IRQS, - &flipper_irq_domain_ops, -1); + irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS, + &flipper_irq_domain_ops, io_base); if (!irq_domain) { pr_err("failed to allocate irq_domain\n"); return NULL; } - irq_domain->host_data = io_base; - out: return irq_domain; } diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c index 2d4a5d48fbbd..499d410b95fa 100644 --- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c +++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c @@ -177,13 +177,12 @@ struct irq_domain *hlwd_pic_init(struct device_node *np) __hlwd_quiesce(io_base); - irq_domain = irq_alloc_host(np, IRQ_DOMAIN_MAP_LINEAR, HLWD_NR_IRQS, - &hlwd_irq_domain_ops, -1); + irq_domain = irq_domain_add_linear(np, HLWD_NR_IRQS, + &hlwd_irq_domain_ops, io_base); if (!irq_domain) { pr_err("failed to allocate irq_domain\n"); return NULL; } - irq_domain->host_data = io_base; return irq_domain; } |