summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-06-14 11:16:14 -0600
committerGrant Likely <grant.likely@secretlab.ca>2011-06-20 23:55:09 -0600
commit987d2da6af396f1b54b13e5bc92481579c954101 (patch)
treee54fe7e33b911b45fd205a0b16218c86bd2e3214 /include
parent166fbb0d3b2fd477f00b412dc4b905d7319cef43 (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')
-rw-r--r--include/linux/irq.h11
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 */