diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-07-05 23:42:29 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-07-19 16:34:48 -0600 |
commit | 9d75ab8108e1d88411e52a5faa5759bddb4b4933 (patch) | |
tree | 4c953fd5ea850c2fc09519bdd39734ad15df8b83 /include/linux | |
parent | 502c091054445f5a34a5994cb6880e0cb1f9014e (diff) |
dt/irq: add irq_domain_generate_simple() helper
irq_domain_generate_simple() is an easy way to generate an irq translation
domain for simple irq controllers. It assumes a flat 1:1 mapping from
hardware irq number to an offset of the first linux irq number assigned
to the controller
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/irq.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index a103c011815..3e5c35f2750 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -797,6 +797,17 @@ extern unsigned int irq_domain_map(struct irq_domain *domain, irq_hw_number_t hwirq); extern void irq_domain_unmap(struct irq_domain *domain, irq_hw_number_t hw); +struct of_device_id; +#ifdef CONFIG_OF +extern void irq_domain_add_simple(struct device_node *controller, int irq_base); +extern void irq_domain_generate_simple(const struct of_device_id *match, + u64 phys_base, unsigned int irq_start); +#else +static inline void irq_domain_generate_simple(const struct of_device_id *match, + u64 phys_base, unsigned int irq_start) { } +#endif + + #endif /* !CONFIG_S390 */ #endif /* _LINUX_IRQ_H */ |