aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-01-26 13:26:52 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-02-16 08:11:23 -0500
commit16b2e6e2f31dda41f114aa0acade04f7e10f67c9 (patch)
tree73f8f3066e09eb7bb427c51fe2711458ac9220a2 /include/linux
parent6b783f7c5dde2648fa0bbe7fc8ac80d78699e67f (diff)
irq_domain: Create common xlate functions that device drivers can use
Rather than having each interrupt controller driver creating its own barely unique .xlate function for irq_domain, create a library of translators which any driver can use directly. v5: - Remove irq_domain_xlate_pci(). It was incorrect. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mark Salter <msalter@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/irqdomain.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index e7379a3c4d7d..ea58f36688a0 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -163,6 +163,18 @@ extern unsigned int irq_linear_revmap(struct irq_domain *host,
163 irq_hw_number_t hwirq); 163 irq_hw_number_t hwirq);
164 164
165extern struct irq_domain_ops irq_domain_simple_ops; 165extern struct irq_domain_ops irq_domain_simple_ops;
166
167/* stock xlate functions */
168int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr,
169 const u32 *intspec, unsigned int intsize,
170 irq_hw_number_t *out_hwirq, unsigned int *out_type);
171int irq_domain_xlate_twocell(struct irq_domain *d, struct device_node *ctrlr,
172 const u32 *intspec, unsigned int intsize,
173 irq_hw_number_t *out_hwirq, unsigned int *out_type);
174int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,
175 const u32 *intspec, unsigned int intsize,
176 irq_hw_number_t *out_hwirq, unsigned int *out_type);
177
166#if defined(CONFIG_OF_IRQ) 178#if defined(CONFIG_OF_IRQ)
167extern void irq_domain_generate_simple(const struct of_device_id *match, 179extern void irq_domain_generate_simple(const struct of_device_id *match,
168 u64 phys_base, unsigned int irq_start); 180 u64 phys_base, unsigned int irq_start);