diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-07-26 05:19:06 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-07-28 03:32:04 -0400 |
commit | 7e71330169d8056536b299290544980bccc6b300 (patch) | |
tree | 7dab4954a7683e35bbf66adadd89b26971960311 /include/linux/irqdomain.h | |
parent | 08a543ad33fc188650801bd36eed4ffe272643e1 (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/irqdomain.h')
-rw-r--r-- | include/linux/irqdomain.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 8f2c10a784a4..e807ad687a07 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define _LINUX_IRQDOMAIN_H | 16 | #define _LINUX_IRQDOMAIN_H |
17 | 17 | ||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/mod_devicetable.h> | ||
19 | 20 | ||
20 | #ifdef CONFIG_IRQ_DOMAIN | 21 | #ifdef CONFIG_IRQ_DOMAIN |
21 | struct device_node; | 22 | struct device_node; |
@@ -78,4 +79,13 @@ extern void irq_domain_add(struct irq_domain *domain); | |||
78 | extern void irq_domain_del(struct irq_domain *domain); | 79 | extern void irq_domain_del(struct irq_domain *domain); |
79 | #endif /* CONFIG_IRQ_DOMAIN */ | 80 | #endif /* CONFIG_IRQ_DOMAIN */ |
80 | 81 | ||
82 | #if defined(CONFIG_IRQ_DOMAIN) && defined(CONFIG_OF_IRQ) | ||
83 | extern void irq_domain_add_simple(struct device_node *controller, int irq_base); | ||
84 | extern void irq_domain_generate_simple(const struct of_device_id *match, | ||
85 | u64 phys_base, unsigned int irq_start); | ||
86 | #else /* CONFIG_IRQ_DOMAIN && CONFIG_OF_IRQ */ | ||
87 | static inline void irq_domain_generate_simple(const struct of_device_id *match, | ||
88 | u64 phys_base, unsigned int irq_start) { } | ||
89 | #endif /* CONFIG_IRQ_DOMAIN && CONFIG_OF_IRQ */ | ||
90 | |||
81 | #endif /* _LINUX_IRQDOMAIN_H */ | 91 | #endif /* _LINUX_IRQDOMAIN_H */ |