summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/common/block/include/intelblocks/irq.h2
-rw-r--r--src/soc/intel/common/block/irq/irq.c19
2 files changed, 21 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 727020a5df..a0cb409ec8 100644
--- a/src/soc/intel/common/block/include/intelblocks/irq.h
+++ b/src/soc/intel/common/block/include/intelblocks/irq.h
@@ -46,4 +46,6 @@ const struct pci_irq_entry *assign_pci_irqs(const struct slot_irq_constraints *c
void generate_pin_irq_map(const struct pci_irq_entry *entries);
+void irq_program_non_pch(const struct pci_irq_entry *entries);
+
#endif /* SOC_INTEL_COMMON_IRQ_H */
diff --git a/src/soc/intel/common/block/irq/irq.c b/src/soc/intel/common/block/irq/irq.c
index eb4daf9a14..96fd733619 100644
--- a/src/soc/intel/common/block/irq/irq.c
+++ b/src/soc/intel/common/block/irq/irq.c
@@ -4,9 +4,11 @@
#include <console/console.h>
#include <device/pci.h>
#include <device/pci_def.h>
+#include <device/pci_ops.h>
#include <intelblocks/gpio.h>
#include <intelblocks/irq.h>
#include <intelblocks/lpc_lib.h>
+#include <soc/pci_devs.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <stdlib.h>
#include <string.h>
@@ -394,3 +396,20 @@ void generate_pin_irq_map(const struct pci_irq_entry *entries)
intel_write_pci0_PRT(pin_irq_map, map_count, &pirq_map);
free(pin_irq_map);
}
+
+void irq_program_non_pch(const struct pci_irq_entry *entries)
+{
+ while (entries) {
+ if (PCI_SLOT(entries->devfn) >= MIN_PCH_SLOT) {
+ entries = entries->next;
+ continue;
+ }
+
+ if (entries->irq)
+ pci_s_write_config8(PCI_DEV(0, PCI_SLOT(entries->devfn),
+ PCI_FUNC(entries->devfn)),
+ PCI_INTERRUPT_LINE, entries->irq);
+
+ entries = entries->next;
+ }
+}