summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include/intelblocks
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2021-06-24 11:48:27 -0600
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-06-29 21:52:44 +0000
commit61005c8eb53bec186bfa8a23e4f9ce755eed7437 (patch)
tree4146d2bfd77c1fea9d8fc0d232195f51d9f6c54f /src/soc/intel/common/block/include/intelblocks
parente9ee919fac1fda650643b255ec536b64ead2bf31 (diff)
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 <twawrzynczak@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55826 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/irq.h5
1 files changed, 5 insertions, 0 deletions
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 <types.h>
#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 */