From 61005c8eb53bec186bfa8a23e4f9ce755eed7437 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Thu, 24 Jun 2021 11:48:27 -0600 Subject: soc/intel/common/irq: Add function to return IRQ for PCI devfn The IRQ for a single device may be required elsewhere, therefore provide get_pci_devfn_irq. BUG=b:130217151, b:171580862, b:176858827 Change-Id: Ibebd821767a2698c9e60b09eeeff3bb596359728 Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/55826 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/include/intelblocks/irq.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/soc/intel/common/block/include/intelblocks') diff --git a/src/soc/intel/common/block/include/intelblocks/irq.h b/src/soc/intel/common/block/include/intelblocks/irq.h index 4a7a13bee0..33c9b7e7ac 100644 --- a/src/soc/intel/common/block/include/intelblocks/irq.h +++ b/src/soc/intel/common/block/include/intelblocks/irq.h @@ -7,6 +7,7 @@ #include #define MAX_FNS 8 +#define INVALID_IRQ -1 #define ANY_PIRQ(x) [PCI_FUNC(x)] = { .fixed_int_pin = PCI_INT_NONE,\ .fixed_pirq = PIRQ_INVALID, \ @@ -61,4 +62,8 @@ bool irq_program_non_pch(void); const struct pci_irq_entry *get_cached_pci_irqs(void); +/* Search the cached PCI IRQ assignment results for the matching devfn and + return the corresponding IRQ, or INVALID_IRQ if not found. */ +int get_pci_devfn_irq(unsigned int devfn); + #endif /* SOC_INTEL_COMMON_IRQ_H */ -- cgit v1.2.3