diff options
author | John Zhao <john.zhao@intel.com> | 2022-01-10 10:51:24 -0800 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2022-01-16 13:20:16 +0000 |
commit | 98ce39dce48d9f4b88fb0d71af654f4ed948ea9b (patch) | |
tree | 782556d7c9e5c1a9698de5acfd44bda5df5cc4e3 /src/soc/intel/common/block/gpio | |
parent | 0f76a18c3a70fbdb1505a7e23b554026596be5c2 (diff) |
soc/intel/common: Abstract the sideband access
The existing Sideband access is with the PCH P2SB. There will be future
platforms which access the TCSS registers through SBI other than the PCH
P2SB. This change abstracts the SBI with common API.
BUG=b:213574324
TEST=Build platforms coreboot images successfully.
Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ia6201762fe92801ce6b4ed97d0eac23ac71ccd37
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60978
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/common/block/gpio')
-rw-r--r-- | src/soc/intel/common/block/gpio/gpio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c index a833aaebb9..e70fcaab48 100644 --- a/src/soc/intel/common/block/gpio/gpio.c +++ b/src/soc/intel/common/block/gpio/gpio.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#define __SIMPLE_DEVICE__ + #include <assert.h> #include <bootstate.h> #include <console/console.h> @@ -10,6 +12,7 @@ #include <intelblocks/itss.h> #include <intelblocks/p2sb.h> #include <intelblocks/pcr.h> +#include <soc/pci_devs.h> #include <soc/pm.h> #include <stdlib.h> #include <types.h> @@ -531,7 +534,7 @@ int gpio_lock_pads(const struct gpio_lock_config *pad_list, const size_t count) if (CONFIG(DEBUG_GPIO)) printk(BIOS_INFO, "%s: Locking pad %d configuration\n", __func__, pad); - status = pcr_execute_sideband_msg(&msg, &data, &response); + status = pcr_execute_sideband_msg(PCH_DEV_P2SB, &msg, &data, &response); if ((err = sideband_msg_err(status, response)) != 0) { err_response = err; continue; @@ -543,7 +546,7 @@ int gpio_lock_pads(const struct gpio_lock_config *pad_list, const size_t count) printk(BIOS_INFO, "%s: Locking pad %d TX state\n", __func__, pad); msg.offset += sizeof(uint32_t); - status = pcr_execute_sideband_msg(&msg, &data, &response); + status = pcr_execute_sideband_msg(PCH_DEV_P2SB, &msg, &data, &response); if ((err = sideband_msg_err(status, response)) != 0) { err_response = err; continue; |