aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r--include/linux/of_irq.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 039f2eec49ce..1e0deb8e8494 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -46,12 +46,14 @@ extern int of_irq_get(struct device_node *dev, int index);
46extern int of_irq_get_byname(struct device_node *dev, const char *name); 46extern int of_irq_get_byname(struct device_node *dev, const char *name);
47extern int of_irq_to_resource_table(struct device_node *dev, 47extern int of_irq_to_resource_table(struct device_node *dev,
48 struct resource *res, int nr_irqs); 48 struct resource *res, int nr_irqs);
49extern struct device_node *of_irq_find_parent(struct device_node *child);
49extern struct irq_domain *of_msi_get_domain(struct device *dev, 50extern struct irq_domain *of_msi_get_domain(struct device *dev,
50 struct device_node *np, 51 struct device_node *np,
51 enum irq_domain_bus_token token); 52 enum irq_domain_bus_token token);
52extern struct irq_domain *of_msi_map_get_device_domain(struct device *dev, 53extern struct irq_domain *of_msi_map_get_device_domain(struct device *dev,
53 u32 rid); 54 u32 rid);
54extern void of_msi_configure(struct device *dev, struct device_node *np); 55extern void of_msi_configure(struct device *dev, struct device_node *np);
56u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in);
55#else 57#else
56static inline int of_irq_count(struct device_node *dev) 58static inline int of_irq_count(struct device_node *dev)
57{ 59{
@@ -70,6 +72,11 @@ static inline int of_irq_to_resource_table(struct device_node *dev,
70{ 72{
71 return 0; 73 return 0;
72} 74}
75static inline void *of_irq_find_parent(struct device_node *child)
76{
77 return NULL;
78}
79
73static inline struct irq_domain *of_msi_get_domain(struct device *dev, 80static inline struct irq_domain *of_msi_get_domain(struct device *dev,
74 struct device_node *np, 81 struct device_node *np,
75 enum irq_domain_bus_token token) 82 enum irq_domain_bus_token token)
@@ -84,6 +91,11 @@ static inline struct irq_domain *of_msi_map_get_device_domain(struct device *dev
84static inline void of_msi_configure(struct device *dev, struct device_node *np) 91static inline void of_msi_configure(struct device *dev, struct device_node *np)
85{ 92{
86} 93}
94static inline u32 of_msi_map_rid(struct device *dev,
95 struct device_node *msi_np, u32 rid_in)
96{
97 return rid_in;
98}
87#endif 99#endif
88 100
89#if defined(CONFIG_OF_IRQ) || defined(CONFIG_SPARC) 101#if defined(CONFIG_OF_IRQ) || defined(CONFIG_SPARC)
@@ -93,7 +105,6 @@ static inline void of_msi_configure(struct device *dev, struct device_node *np)
93 * so declare it here regardless of the CONFIG_OF_IRQ setting. 105 * so declare it here regardless of the CONFIG_OF_IRQ setting.
94 */ 106 */
95extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); 107extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
96u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in);
97 108
98#else /* !CONFIG_OF && !CONFIG_SPARC */ 109#else /* !CONFIG_OF && !CONFIG_SPARC */
99static inline unsigned int irq_of_parse_and_map(struct device_node *dev, 110static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
@@ -101,12 +112,6 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
101{ 112{
102 return 0; 113 return 0;
103} 114}
104
105static inline u32 of_msi_map_rid(struct device *dev,
106 struct device_node *msi_np, u32 rid_in)
107{
108 return rid_in;
109}
110#endif /* !CONFIG_OF */ 115#endif /* !CONFIG_OF */
111 116
112#endif /* __OF_IRQ_H */ 117#endif /* __OF_IRQ_H */