diff options
author | David Daney <david.daney@cavium.com> | 2015-10-08 15:10:48 -0700 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-10-16 11:45:27 +0100 |
commit | 8db02d8b4089fa8098a170738e8ae7939aa8ae7a (patch) | |
tree | ea1896aed96b16e1b5e3f82a015c7067d66cd6ba /include/linux/of_irq.h | |
parent | b531566e4dced7566dfa2e4925ec8b6a8cb7806b (diff) |
of/irq: Add new function of_msi_map_rid()
The device tree property "msi-map" specifies how to create the PCI
requester id used in some MSI controllers. Add a new function
of_msi_map_rid() that finds the msi-map property and applies its
translation to a given requester id.
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r-- | include/linux/of_irq.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 4bcbd586a672..8cd9334e5731 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -75,6 +75,7 @@ static inline int of_irq_to_resource_table(struct device_node *dev, extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); extern struct device_node *of_irq_find_parent(struct device_node *child); extern void of_msi_configure(struct device *dev, struct device_node *np); +u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in); #else /* !CONFIG_OF */ static inline unsigned int irq_of_parse_and_map(struct device_node *dev, @@ -87,6 +88,12 @@ static inline void *of_irq_find_parent(struct device_node *child) { return NULL; } + +static inline u32 of_msi_map_rid(struct device *dev, + struct device_node *msi_np, u32 rid_in) +{ + return rid_in; +} #endif /* !CONFIG_OF */ #endif /* __OF_IRQ_H */ |