diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-05 12:19:19 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-07-11 14:59:17 +0100 |
commit | 781d0f46d81e2c26c70649903b503bcfe817efc8 (patch) | |
tree | 11794b64c41e8468db6d14243c5becce3b5b64c8 /include/linux/irqdomain.h | |
parent | aed98048bd1c83469d96932c1901e867d9ba519a (diff) | |
download | linux-stable-781d0f46d81e2c26c70649903b503bcfe817efc8.tar.gz linux-stable-781d0f46d81e2c26c70649903b503bcfe817efc8.tar.bz2 linux-stable-781d0f46d81e2c26c70649903b503bcfe817efc8.zip |
irq_domain: Standardise legacy/linear domain selection
A large proportion of interrupt controllers that support legacy mappings
do so because non-DT systems need to use fixed IRQ numbers when registering
devices via buses but can otherwise use a linear mapping. The interrupt
controller itself typically is not affected by the mapping used and best
practice is to use a linear mapping where possible so drivers frequently
select at runtime depending on if a legacy range has been allocated to
them.
Standardise this behaviour by providing irq_domain_register_simple() which
will allocate a linear mapping unless a positive first_irq is provided in
which case it will fall back to a legacy mapping. This helps make best
practice for irq_domain adoption clearer.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/irqdomain.h')
-rw-r--r-- | include/linux/irqdomain.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 5abb533eb8eb..17b60be30fff 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -112,6 +112,11 @@ struct irq_domain { }; #ifdef CONFIG_IRQ_DOMAIN +struct irq_domain *irq_domain_add_simple(struct device_node *of_node, + unsigned int size, + unsigned int first_irq, + const struct irq_domain_ops *ops, + void *host_data); struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, unsigned int size, unsigned int first_irq, |