drivers: pcie: add prt support for pci legacy interrupt
add support for obtain irq number from pci irq routing table Signed-off-by: Najumon Ba <najumon.ba@intel.com>
This commit is contained in:
parent
f25dfcf88c
commit
a72271f27f
1 changed files with 8 additions and 1 deletions
|
@ -14,6 +14,7 @@ LOG_MODULE_REGISTER(pcie, LOG_LEVEL_ERR);
|
|||
#include <stdbool.h>
|
||||
#include <zephyr/drivers/pcie/pcie.h>
|
||||
#include <zephyr/sys/iterable_sections.h>
|
||||
#include <zephyr/acpi/acpi.h>
|
||||
|
||||
#if CONFIG_PCIE_MSI
|
||||
#include <zephyr/drivers/pcie/msi.h>
|
||||
|
@ -285,7 +286,13 @@ unsigned int pcie_alloc_irq(pcie_bdf_t bdf)
|
|||
if (irq == PCIE_CONF_INTR_IRQ_NONE ||
|
||||
irq >= CONFIG_MAX_IRQ_LINES ||
|
||||
arch_irq_is_used(irq)) {
|
||||
irq = arch_irq_allocate();
|
||||
|
||||
if (IS_ENABLED(CONFIG_ACPI)) {
|
||||
irq = acpi_legacy_irq_get(bdf);
|
||||
} else {
|
||||
irq = arch_irq_allocate();
|
||||
}
|
||||
|
||||
if (irq == UINT_MAX) {
|
||||
return PCIE_CONF_INTR_IRQ_NONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue