From 0dc82cc80b217a066c4f9abd8c2c91abd8ae51f0 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Thu, 4 Feb 2021 17:04:24 -0700 Subject: soc/intel/common: Add function to lpc_lib to return PIRQ routing In order to fill out static entries for a _PRT table for soc/intel/common, the PIRQ<->IRQ mapping is required. This patch adds a function lpc_get_pch_pirq_routing() which returns this mapping. Signed-off-by: Tim Wawrzynczak Change-Id: Ib215fba54573c50a88aa4584442bd8d27ae017be Reviewed-on: https://review.coreboot.org/c/coreboot/+/50858 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/soc/intel/common/block/include/intelblocks/itss.h | 6 ++---- src/soc/intel/common/block/include/intelblocks/lpc_lib.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/soc/intel/common/block/include/intelblocks') diff --git a/src/soc/intel/common/block/include/intelblocks/itss.h b/src/soc/intel/common/block/include/intelblocks/itss.h index ade9756b6b..286304c031 100644 --- a/src/soc/intel/common/block/include/intelblocks/itss.h +++ b/src/soc/intel/common/block/include/intelblocks/itss.h @@ -3,9 +3,6 @@ #ifndef SOC_INTEL_COMMON_BLOCK_ITSS_H #define SOC_INTEL_COMMON_BLOCK_ITSS_H -/* Max PXRC registers in ITSS*/ -#define MAX_PXRC_CONFIG (PCR_ITSS_PIRQH_ROUT - PCR_ITSS_PIRQA_ROUT + 1) - /* PIRQA Routing Control Register*/ #define PCR_ITSS_PIRQA_ROUT 0x3100 /* PIRQB Routing Control Register*/ @@ -29,6 +26,7 @@ #if !defined(__ACPI__) +#include #include /* Set the interrupt polarity for provided IRQ to the APIC. */ @@ -38,7 +36,7 @@ void itss_set_irq_polarity(int irq, int active_low); void itss_snapshot_irq_polarities(int start, int end); void itss_restore_irq_polarities(int start, int end); -void itss_irq_init(uint8_t pch_interrupt_routing[MAX_PXRC_CONFIG]); +void itss_irq_init(const uint8_t pch_interrupt_routing[PIRQ_COUNT]); void itss_clock_gate_8254(void); #endif /* !defined(__ACPI__) */ diff --git a/src/soc/intel/common/block/include/intelblocks/lpc_lib.h b/src/soc/intel/common/block/include/intelblocks/lpc_lib.h index c22eea3ad0..43a30010d3 100644 --- a/src/soc/intel/common/block/include/intelblocks/lpc_lib.h +++ b/src/soc/intel/common/block/include/intelblocks/lpc_lib.h @@ -105,5 +105,5 @@ void pch_misc_init(void); unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp); - +const uint8_t *lpc_get_pic_pirq_routing(size_t *num); #endif /* _SOC_COMMON_BLOCK_LPC_LIB_H_ */ -- cgit v1.2.3