diff options
Diffstat (limited to 'include/linux/of_irq.h')
-rw-r--r-- | include/linux/of_irq.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 4bcbd586a672..039f2eec49ce 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
@@ -46,6 +46,12 @@ extern int of_irq_get(struct device_node *dev, int index); | |||
46 | extern int of_irq_get_byname(struct device_node *dev, const char *name); | 46 | extern int of_irq_get_byname(struct device_node *dev, const char *name); |
47 | extern int of_irq_to_resource_table(struct device_node *dev, | 47 | extern int of_irq_to_resource_table(struct device_node *dev, |
48 | struct resource *res, int nr_irqs); | 48 | struct resource *res, int nr_irqs); |
49 | extern struct irq_domain *of_msi_get_domain(struct device *dev, | ||
50 | struct device_node *np, | ||
51 | enum irq_domain_bus_token token); | ||
52 | extern struct irq_domain *of_msi_map_get_device_domain(struct device *dev, | ||
53 | u32 rid); | ||
54 | extern void of_msi_configure(struct device *dev, struct device_node *np); | ||
49 | #else | 55 | #else |
50 | static inline int of_irq_count(struct device_node *dev) | 56 | static inline int of_irq_count(struct device_node *dev) |
51 | { | 57 | { |
@@ -64,28 +70,42 @@ static inline int of_irq_to_resource_table(struct device_node *dev, | |||
64 | { | 70 | { |
65 | return 0; | 71 | return 0; |
66 | } | 72 | } |
73 | static inline struct irq_domain *of_msi_get_domain(struct device *dev, | ||
74 | struct device_node *np, | ||
75 | enum irq_domain_bus_token token) | ||
76 | { | ||
77 | return NULL; | ||
78 | } | ||
79 | static inline struct irq_domain *of_msi_map_get_device_domain(struct device *dev, | ||
80 | u32 rid) | ||
81 | { | ||
82 | return NULL; | ||
83 | } | ||
84 | static inline void of_msi_configure(struct device *dev, struct device_node *np) | ||
85 | { | ||
86 | } | ||
67 | #endif | 87 | #endif |
68 | 88 | ||
69 | #if defined(CONFIG_OF) | 89 | #if defined(CONFIG_OF_IRQ) || defined(CONFIG_SPARC) |
70 | /* | 90 | /* |
71 | * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC | 91 | * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC |
72 | * implements it differently. However, the prototype is the same for all, | 92 | * implements it differently. However, the prototype is the same for all, |
73 | * so declare it here regardless of the CONFIG_OF_IRQ setting. | 93 | * so declare it here regardless of the CONFIG_OF_IRQ setting. |
74 | */ | 94 | */ |
75 | extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); | 95 | extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); |
76 | extern struct device_node *of_irq_find_parent(struct device_node *child); | 96 | u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in); |
77 | extern void of_msi_configure(struct device *dev, struct device_node *np); | ||
78 | 97 | ||
79 | #else /* !CONFIG_OF */ | 98 | #else /* !CONFIG_OF && !CONFIG_SPARC */ |
80 | static inline unsigned int irq_of_parse_and_map(struct device_node *dev, | 99 | static inline unsigned int irq_of_parse_and_map(struct device_node *dev, |
81 | int index) | 100 | int index) |
82 | { | 101 | { |
83 | return 0; | 102 | return 0; |
84 | } | 103 | } |
85 | 104 | ||
86 | static inline void *of_irq_find_parent(struct device_node *child) | 105 | static inline u32 of_msi_map_rid(struct device *dev, |
106 | struct device_node *msi_np, u32 rid_in) | ||
87 | { | 107 | { |
88 | return NULL; | 108 | return rid_in; |
89 | } | 109 | } |
90 | #endif /* !CONFIG_OF */ | 110 | #endif /* !CONFIG_OF */ |
91 | 111 | ||