drivers/pcie: Add a marco for fixed or MSI IRQ
This is meant to be called by drivers on PCIe BUS with a fixed (from DTS) IRQ or an MSI one. I.e.: all drivers without a runtime IRQ detection/allocation. The arch-specific macro is required to be implemented relevantly. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
b5fecc5ff8
commit
b5ad9739df
2 changed files with 27 additions and 0 deletions
|
@ -313,6 +313,25 @@ extern bool pcie_connect_dynamic_irq(pcie_bdf_t bdf,
|
|||
#define PCIE_MAX_DEV (0xFFFFFFFF & PCIE_BDF_DEV_MASK)
|
||||
#define PCIE_MAX_FUNC (0xFFFFFFFF & PCIE_BDF_FUNC_MASK)
|
||||
|
||||
/**
|
||||
* @brief Initialize an interrupt handler for a PCIe endpoint IRQ
|
||||
*
|
||||
* This routine is only meant to be used by drivers using PCIe bus and having
|
||||
* fixed or MSI based IRQ (so no runtime detection of the IRQ). In case
|
||||
* of runtime detection see pcie_connect_dynamic_irq()
|
||||
*
|
||||
* @param bdf_p PCIe endpoint BDF
|
||||
* @param irq_p IRQ line number.
|
||||
* @param priority_p Interrupt priority.
|
||||
* @param isr_p Address of interrupt service routine.
|
||||
* @param isr_param_p Parameter passed to interrupt service routine.
|
||||
* @param flags_p Architecture-specific IRQ configuration flags..
|
||||
*/
|
||||
#define PCIE_IRQ_CONNECT(bdf_p, irq_p, priority_p, \
|
||||
isr_p, isr_param_p, flags_p) \
|
||||
ARCH_PCIE_IRQ_CONNECT(bdf_p, irq_p, priority_p, \
|
||||
isr_p, isr_param_p, flags_p)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -313,6 +313,14 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
|||
* @see IRQ_CONNECT()
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PCIE
|
||||
/**
|
||||
* @def ARCH_PCIE_IRQ_CONNECT(bdf, irq, pri, isr, arg, flags)
|
||||
*
|
||||
* @see PCIE_IRQ_CONNECT()
|
||||
*/
|
||||
#endif /* CONFIG_PCIE */
|
||||
|
||||
/**
|
||||
* @def ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue