Attention is currently required from: Patrick Rudolph. Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/52590 )
Change subject: soc/intel/common: Add CPU Port ID field to GPIO communities ......................................................................
soc/intel/common: Add CPU Port ID field to GPIO communities
The CPU can have its own Port IDs when addressing GPIO communities, which differ from the PCH PCR IDs.
1) Add a field to `struct pad_community` that can hold this value when known. 2) Add a function to return this value for a given GPIO pad.
Change-Id: I007c01758ae3026fe4dfef07b6a3a269ee3f9e33 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/soc/intel/common/block/gpio/gpio.c M src/soc/intel/common/block/include/intelblocks/gpio.h 2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/52590/1
diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c index 9719a1b2..26c4058 100644 --- a/src/soc/intel/common/block/gpio/gpio.c +++ b/src/soc/intel/common/block/gpio/gpio.c @@ -694,6 +694,12 @@ return comm->groups[i].virtual_wire_index; }
+int gpio_get_pad_cpu_portid(gpio_t pad) +{ + const struct pad_community *comm = gpio_get_community(pad); + return comm->cpu_port; +} + static uint32_t *snapshot;
static void *allocate_snapshot_space(void) diff --git a/src/soc/intel/common/block/include/intelblocks/gpio.h b/src/soc/intel/common/block/include/intelblocks/gpio.h index aa28b6a..a6b5719 100644 --- a/src/soc/intel/common/block/include/intelblocks/gpio.h +++ b/src/soc/intel/common/block/include/intelblocks/gpio.h @@ -134,6 +134,7 @@ uint8_t gpi_status_offset; /* specifies offset in struct gpi_status */ uint8_t port; /* PCR Port ID */ + uint8_t cpu_port; /* CPU Port ID */ const struct reset_mapping *reset_map; /* PADRSTCFG logical to chipset mapping */ size_t num_reset_vals; @@ -256,5 +257,8 @@ /* Returns virtual wire index for the pad; can be VW_INDEX_NONE */ int gpio_get_vw_index(gpio_t pad);
+/* Returns PCR port ID for this pad for the CPU */ +int gpio_get_pad_cpu_portid(gpio_t pad); + #endif #endif /* _SOC_INTELBLOCKS_GPIO_H_ */