summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-01-04 21:16:33 +0000
committerSubrata Banik <subratabanik@google.com>2022-01-06 15:19:44 +0000
commit724fc89887a9ed32a49f9f947a8b4a2737268db3 (patch)
tree7e8798040126256d12379613bcec803c566beb89
parentd43d864fc0230858614704d5ce79903ddd6c705a (diff)
soc/intel/common/gpio: Skip GPP pad lock config if config is not set
Don't perform GPP lock configuration if SOC_INTEL_COMMON_BLOCK_SMM_LOCK_GPIO_PADS config is not selected. This patch fixes a compilation issue when APL/GLK boards are failing while gpio_lock_pads() function is getting called from IA common gpio block. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I392dc2007dba8169e480f82b58b7f0a1578bb09f Reviewed-on: https://review.coreboot.org/c/coreboot/+/60776 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--src/soc/intel/common/block/gpio/gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c
index 419c77ea48..1bc34e7fc3 100644
--- a/src/soc/intel/common/block/gpio/gpio.c
+++ b/src/soc/intel/common/block/gpio/gpio.c
@@ -469,6 +469,9 @@ int gpio_lock_pads(const struct gpio_lock_config *pad_list, const size_t count)
uint32_t data;
gpio_t pad;
+ if (!CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_LOCK_GPIO_PADS))
+ return -1;
+
/*
* FSP-S will unlock all the GPIO pads and hide the P2SB device. With
* the device hidden, we will not be able to send the sideband interface