summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/irq/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common/block/irq/irq.c')
-rw-r--r--src/soc/intel/common/block/irq/irq.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/irq/irq.c b/src/soc/intel/common/block/irq/irq.c
index b3f5c73b38..f0892a988c 100644
--- a/src/soc/intel/common/block/irq/irq.c
+++ b/src/soc/intel/common/block/irq/irq.c
@@ -21,7 +21,6 @@
#define IDX2PIN(i) (enum pci_pin)((i) + PCI_INT_A)
#define PIN2IDX(p) (size_t)((p) - PCI_INT_A)
-#define INVALID_IRQ -1
struct pin_info {
enum pin_state {
@@ -429,3 +428,17 @@ bool irq_program_non_pch(void)
return true;
}
+
+int get_pci_devfn_irq(unsigned int devfn)
+{
+ const struct pci_irq_entry *entry = cached_entries;
+
+ while (entry) {
+ if (entry->devfn == devfn)
+ return entry->irq;
+
+ entry = entry->next;
+ }
+
+ return INVALID_IRQ;
+}