Matt DeVillier has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86414?usp=email )
Change subject: soc/intel/common/gpio: Add macro for interrupt GPI with driver mode ......................................................................
soc/intel/common/gpio: Add macro for interrupt GPI with driver mode
Adds PAD_CFG_GPI_APIC_DRIVER macros to configure interrupt pad with driver mode. This is needed when a PAD is configured as an interrupt such that the corresponding GPI_IS status bit can be updated by the host controller hardware.
BUG=none TEST=Check a GPIO pad that is used as interrupt via GpioInt in the ACPI device _CRS method and check the interrupt has been assigned in /proc/interrupts.
Signed-off-by: Cliff Huang cliff.huang@intel.com Change-Id: Ibc1ed3089c24302bc7eb02318714b8ec464fad01 Reviewed-on: https://review.coreboot.org/c/coreboot/+/86414 Reviewed-by: Wonkyu Kim wonkyu.kim@intel.com Reviewed-by: Kyoung Il Kim kyoung.il.kim@intel.com Reviewed-by: Bora Guvendik bora.guvendik@intel.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/intel/common/block/include/intelblocks/gpio_defs.h 1 file changed, 8 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Bora Guvendik: Looks good to me, approved Kyoung Il Kim: Looks good to me, but someone else must approve Wonkyu Kim: Looks good to me, but someone else must approve
diff --git a/src/soc/intel/common/block/include/intelblocks/gpio_defs.h b/src/soc/intel/common/block/include/intelblocks/gpio_defs.h index f0ff08c..bcf8e73 100644 --- a/src/soc/intel/common/block/include/intelblocks/gpio_defs.h +++ b/src/soc/intel/common/block/include/intelblocks/gpio_defs.h @@ -436,6 +436,14 @@ PAD_IRQ_CFG(IOAPIC, trig, inv), PAD_PULL(pull) | \ PAD_IOSSTATE(TxDRxE))
+/* General purpose input, routed to APIC, HostOwn */ +#define PAD_CFG_GPI_APIC_DRIVER(pad, pull, rst, trig, inv) \ + _PAD_CFG_STRUCT(pad, \ + PAD_FUNC(GPIO) | PAD_RESET(rst) | PAD_BUF(TX_DISABLE) | \ + PAD_IRQ_CFG(IOAPIC, trig, inv), PAD_PULL(pull) | \ + PAD_IOSSTATE(TxDRxE) | \ + PAD_CFG_OWN_GPIO(DRIVER)) + /* General purpose input with lock, routed to APIC */ #define PAD_CFG_GPI_APIC_LOCK(pad, pull, trig, inv, lock_action) \ _PAD_CFG_STRUCT_LOCK(pad, \