aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/linux/irqdomain.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 18f4ab002d2e..f95553fa6872 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -95,10 +95,6 @@ struct irq_domain {
95 95
96 /* type of reverse mapping_technique */ 96 /* type of reverse mapping_technique */
97 unsigned int revmap_type; 97 unsigned int revmap_type;
98#define IRQ_DOMAIN_MAP_LEGACY 0 /* legacy 8259, gets irqs 1..15 */
99#define IRQ_DOMAIN_MAP_NOMAP 1 /* no fast reverse mapping */
100#define IRQ_DOMAIN_MAP_LINEAR 2 /* linear map of interrupts */
101#define IRQ_DOMAIN_MAP_TREE 3 /* radix tree */
102 union { 98 union {
103 struct { 99 struct {
104 unsigned int size; 100 unsigned int size;
@@ -120,11 +116,21 @@ struct irq_domain {
120 116
121#ifdef CONFIG_IRQ_DOMAIN 117#ifdef CONFIG_IRQ_DOMAIN
122#ifdef CONFIG_PPC 118#ifdef CONFIG_PPC
123extern struct irq_domain *irq_alloc_host(struct device_node *of_node, 119struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
124 unsigned int revmap_type, 120 struct irq_domain_ops *ops,
125 unsigned int revmap_arg, 121 void *host_data);
126 struct irq_domain_ops *ops, 122struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
127 irq_hw_number_t inval_irq); 123 unsigned int size,
124 struct irq_domain_ops *ops,
125 void *host_data);
126struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
127 struct irq_domain_ops *ops,
128 void *host_data);
129struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
130 struct irq_domain_ops *ops,
131 void *host_data);
132
133
128extern struct irq_domain *irq_find_host(struct device_node *node); 134extern struct irq_domain *irq_find_host(struct device_node *node);
129extern void irq_set_default_host(struct irq_domain *host); 135extern void irq_set_default_host(struct irq_domain *host);
130extern void irq_set_virq_count(unsigned int count); 136extern void irq_set_virq_count(unsigned int count);