From 740cd31858275b25fb7d0d224720739967f4e06e Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Thu, 4 Feb 2021 16:33:04 -0700 Subject: soc/intel/common/gpio: Add gpio_routes_ioapic_irq function This function returns true if any GPIO pad is programmed to route the given IRQ to the IO-APIC. It does so by keeping track of which pads are routed to IOxAPIC and looking this up in the new function. Signed-off-by: Tim Wawrzynczak Change-Id: Iceda89cb111caa15056c204b143b4a17d59e523e Reviewed-on: https://review.coreboot.org/c/coreboot/+/49407 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/intel/common/block/include/intelblocks/gpio.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/soc/intel/common/block/include') diff --git a/src/soc/intel/common/block/include/intelblocks/gpio.h b/src/soc/intel/common/block/include/intelblocks/gpio.h index 4c29a0c5ba..45ae1da4fd 100644 --- a/src/soc/intel/common/block/include/intelblocks/gpio.h +++ b/src/soc/intel/common/block/include/intelblocks/gpio.h @@ -229,5 +229,11 @@ void gpio_pm_configure(const uint8_t *misccfg_pm_values, size_t num); */ void block_gpio_enable(struct device *dev); +/* + * Returns true if any GPIO that uses the specified IRQ is also programmed to + * route IRQs to IOAPIC. + */ +bool gpio_routes_ioapic_irq(unsigned int irq); + #endif #endif /* _SOC_INTELBLOCKS_GPIO_H_ */ -- cgit v1.2.3