diff options
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r-- | include/linux/msi.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index ad939d0ba816..f71a25e5fd25 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -163,6 +163,8 @@ struct msi_controller { | |||
163 | 163 | ||
164 | int (*setup_irq)(struct msi_controller *chip, struct pci_dev *dev, | 164 | int (*setup_irq)(struct msi_controller *chip, struct pci_dev *dev, |
165 | struct msi_desc *desc); | 165 | struct msi_desc *desc); |
166 | int (*setup_irqs)(struct msi_controller *chip, struct pci_dev *dev, | ||
167 | int nvec, int type); | ||
166 | void (*teardown_irq)(struct msi_controller *chip, unsigned int irq); | 168 | void (*teardown_irq)(struct msi_controller *chip, unsigned int irq); |
167 | }; | 169 | }; |
168 | 170 | ||
@@ -174,6 +176,7 @@ struct msi_controller { | |||
174 | struct irq_domain; | 176 | struct irq_domain; |
175 | struct irq_chip; | 177 | struct irq_chip; |
176 | struct device_node; | 178 | struct device_node; |
179 | struct fwnode_handle; | ||
177 | struct msi_domain_info; | 180 | struct msi_domain_info; |
178 | 181 | ||
179 | /** | 182 | /** |
@@ -262,7 +265,7 @@ enum { | |||
262 | int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask, | 265 | int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask, |
263 | bool force); | 266 | bool force); |
264 | 267 | ||
265 | struct irq_domain *msi_create_irq_domain(struct device_node *of_node, | 268 | struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, |
266 | struct msi_domain_info *info, | 269 | struct msi_domain_info *info, |
267 | struct irq_domain *parent); | 270 | struct irq_domain *parent); |
268 | int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, | 271 | int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, |
@@ -270,7 +273,7 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, | |||
270 | void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev); | 273 | void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev); |
271 | struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain); | 274 | struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain); |
272 | 275 | ||
273 | struct irq_domain *platform_msi_create_irq_domain(struct device_node *np, | 276 | struct irq_domain *platform_msi_create_irq_domain(struct fwnode_handle *fwnode, |
274 | struct msi_domain_info *info, | 277 | struct msi_domain_info *info, |
275 | struct irq_domain *parent); | 278 | struct irq_domain *parent); |
276 | int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec, | 279 | int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec, |
@@ -280,19 +283,26 @@ void platform_msi_domain_free_irqs(struct device *dev); | |||
280 | 283 | ||
281 | #ifdef CONFIG_PCI_MSI_IRQ_DOMAIN | 284 | #ifdef CONFIG_PCI_MSI_IRQ_DOMAIN |
282 | void pci_msi_domain_write_msg(struct irq_data *irq_data, struct msi_msg *msg); | 285 | void pci_msi_domain_write_msg(struct irq_data *irq_data, struct msi_msg *msg); |
283 | struct irq_domain *pci_msi_create_irq_domain(struct device_node *node, | 286 | struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode, |
284 | struct msi_domain_info *info, | 287 | struct msi_domain_info *info, |
285 | struct irq_domain *parent); | 288 | struct irq_domain *parent); |
286 | int pci_msi_domain_alloc_irqs(struct irq_domain *domain, struct pci_dev *dev, | 289 | int pci_msi_domain_alloc_irqs(struct irq_domain *domain, struct pci_dev *dev, |
287 | int nvec, int type); | 290 | int nvec, int type); |
288 | void pci_msi_domain_free_irqs(struct irq_domain *domain, struct pci_dev *dev); | 291 | void pci_msi_domain_free_irqs(struct irq_domain *domain, struct pci_dev *dev); |
289 | struct irq_domain *pci_msi_create_default_irq_domain(struct device_node *node, | 292 | struct irq_domain *pci_msi_create_default_irq_domain(struct fwnode_handle *fwnode, |
290 | struct msi_domain_info *info, struct irq_domain *parent); | 293 | struct msi_domain_info *info, struct irq_domain *parent); |
291 | 294 | ||
292 | irq_hw_number_t pci_msi_domain_calc_hwirq(struct pci_dev *dev, | 295 | irq_hw_number_t pci_msi_domain_calc_hwirq(struct pci_dev *dev, |
293 | struct msi_desc *desc); | 296 | struct msi_desc *desc); |
294 | int pci_msi_domain_check_cap(struct irq_domain *domain, | 297 | int pci_msi_domain_check_cap(struct irq_domain *domain, |
295 | struct msi_domain_info *info, struct device *dev); | 298 | struct msi_domain_info *info, struct device *dev); |
299 | u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev); | ||
300 | struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev); | ||
301 | #else | ||
302 | static inline struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev) | ||
303 | { | ||
304 | return NULL; | ||
305 | } | ||
296 | #endif /* CONFIG_PCI_MSI_IRQ_DOMAIN */ | 306 | #endif /* CONFIG_PCI_MSI_IRQ_DOMAIN */ |
297 | 307 | ||
298 | #endif /* LINUX_MSI_H */ | 308 | #endif /* LINUX_MSI_H */ |