aboutsummaryrefslogtreecommitdiff
path: root/include/linux/of_irq.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-09-18 14:07:40 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2015-10-16 13:07:13 +0100
commit48ae34fb39b0c0cfc76275e844fba5b0b04fa49e (patch)
tree94509b2e66dbbe14de299c05bfc0336aceecefb7 /include/linux/of_irq.h
parentccf91e68a4357e7b65a3f1f13f8af2b767213575 (diff)
downloadlinux-stericsson-48ae34fb39b0c0cfc76275e844fba5b0b04fa49e.tar.gz
of/irq: Add support code for multi-parent version of "msi-parent"
Since 126b16e2ad98 ("Docs: dt: add generic MSI bindings"), the definition of "msi-parent" has evolved, while maintaining some degree of compatibility. It can now express multiple MSI controllers as parents, as well as some sideband data being communicated to the controller. This patch adds the parsing of the property, iterating over the multiple parents until a suitable irqdomain is found. It can also fallback to the original parsing if the old binding is detected. This support code gets used in the subsequent patches. Suggested-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r--include/linux/of_irq.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 8cd9334e5731..62ae6edecfd5 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -46,6 +46,9 @@ extern int of_irq_get(struct device_node *dev, int index);
extern int of_irq_get_byname(struct device_node *dev, const char *name);
extern int of_irq_to_resource_table(struct device_node *dev,
struct resource *res, int nr_irqs);
+extern struct irq_domain *of_msi_get_domain(struct device *dev,
+ struct device_node *np,
+ enum irq_domain_bus_token token);
#else
static inline int of_irq_count(struct device_node *dev)
{
@@ -64,6 +67,12 @@ static inline int of_irq_to_resource_table(struct device_node *dev,
{
return 0;
}
+static inline struct irq_domain *of_msi_get_domain(struct device *dev,
+ struct device_node *np,
+ enum irq_domain_bus_token token)
+{
+ return NULL;
+}
#endif
#if defined(CONFIG_OF)