From 4db78e39dafa78a65ca9794e9344ce99f699740a Mon Sep 17 00:00:00 2001 From: Kane Chen Date: Wed, 31 May 2017 18:36:45 +0800 Subject: [PATCH] soc/intel/skylake: Add macro for setting GPIO interrupt trigger mode. Currently, there is no macro to set GPIO interrupt trigger mode. The purpose is to make coreboot set same trigger mode as GpioInt BUG=b:62067569 TEST=checked unused interrupt on SD_CD does not happen after s3 resume Change-Id: I42b9cd80b494e24c55b97e54cdf59bfd24dd9054 Signed-off-by: Kane Chen Reviewed-on: https://review.coreboot.org/19992 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh --- src/soc/intel/skylake/include/soc/gpio.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/soc/intel/skylake/include/soc/gpio.h b/src/soc/intel/skylake/include/soc/gpio.h index ae534cd9ce..4f809cf480 100644 --- a/src/soc/intel/skylake/include/soc/gpio.h +++ b/src/soc/intel/skylake/include/soc/gpio.h @@ -140,6 +140,12 @@ void gpio_configure_pads(const struct pad_config *cfgs, size_t num); _DW0_VALS(rst_, RAW, NO, LEVEL, NO, NO, NO, NO, NO, NO, GPIO, NO, YES),\ PAD_FIELD(HOSTSW, GPIO)) +/* General purpose input passed through to GPIO interrupt */ +#define PAD_CFG_GPI_INT(pad_, term_, rst_, trig_) \ + _PAD_CFG_ATTRS(pad_, term_, \ + _DW0_VALS(rst_, RAW, NO, trig_, NO, NO, NO, NO, NO, NO, GPIO, NO, YES),\ + PAD_FIELD(HOSTSW, GPIO)) + /* General purpose input passed through to IOxAPIC. Assume APIC logic can * handle polarity/edge/level constraints. */ #define PAD_CFG_GPI_APIC(pad_, term_, rst_) \