From 8cfa5deb168a9556330849a11bc0214e3d260ece Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 21 Apr 2021 19:18:57 +0300 Subject: [PATCH] drivers: uart_ns16550: Remove support for hard-coded PCIe interrupts There are no boards that need hard-coded interrupts so just remove this build-time conditional branch. The way going forward is that all PCIe devices should always use PCIE_IRQ_DETECT. Signed-off-by: Johan Hedberg --- drivers/serial/uart_ns16550_port_x.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/serial/uart_ns16550_port_x.h b/drivers/serial/uart_ns16550_port_x.h index 89d7a3c6c91..5d59620b96f 100644 --- a/drivers/serial/uart_ns16550_port_x.h +++ b/drivers/serial/uart_ns16550_port_x.h @@ -76,10 +76,9 @@ static void irq_config_func_@NUM@(const struct device *dev) ARG_UNUSED(dev); #if DT_INST_ON_BUS(@NUM@, pcie) -#if DT_INST_IRQN(@NUM@) == PCIE_IRQ_DETECT - /* PCI(e) with auto IRQ detection */ - + BUILD_ASSERT(DT_INST_IRQN(@NUM@) == PCIE_IRQ_DETECT, + "Only runtime IRQ configuration is supported"); BUILD_ASSERT(IS_ENABLED(CONFIG_DYNAMIC_INTERRUPTS), "NS16550 PCI auto-IRQ needs CONFIG_DYNAMIC_INTERRUPTS"); @@ -98,21 +97,6 @@ static void irq_config_func_@NUM@(const struct device *dev) INST_@NUM@_IRQ_FLAGS); pcie_irq_enable(DT_INST_REG_ADDR(@NUM@), irq); - -#else - - /* PCI(e) with fixed or MSI IRQ */ - - IRQ_CONNECT(DT_INST_IRQN(@NUM@), - DT_INST_IRQ(@NUM@, priority), - uart_ns16550_isr, - DEVICE_DT_INST_GET(@NUM@), - INST_@NUM@_IRQ_FLAGS); - - pcie_irq_enable(DT_INST_REG_ADDR(@NUM@), - DT_INST_IRQN(@NUM@)); - -#endif #else /* not PCI(e) */