drivers/uart_ns16550: enable auto IRQ detection for PCI(e) endpoints

If a UART is configured with IRQ == PCIE_IRQ_DETECT, then use the
pcie_wired_irq() to determine the IRQ at runtime, and install the
handler using the dynamic interrupt mechanism.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
Charles E. Youse 2019-05-02 14:22:00 -07:00 committed by Anas Nashif
commit 869c5d2e54
2 changed files with 47 additions and 7 deletions

View file

@ -7,6 +7,15 @@
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PCIE_PCIE_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_PCIE_PCIE_H_
/*
* Set the device's IRQ (in devicetree, or whatever) to PCIE_IRQ_DETECT
* if the device doesn't support MSI and we don't/can't know the wired IRQ
* allocated by the firmware ahead of time. Use of this functionality will
* generally also require CONFIG_DYNAMIC_INTERRUPTS.
*/
#define PCIE_IRQ_DETECT 0xFFFFFFFU
/*
* We represent a PCI device ID as [31:16] device ID, [15:0] vendor ID. Not
* coincidentally, this is same representation used in PCI configuration space.