diff options
author | Robert Zieba <robertzieba@google.com> | 2022-10-03 14:50:55 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-26 22:02:32 +0000 |
commit | b3b27f7dea3ac7170adfbfc7e6d4ca7bde9ab780 (patch) | |
tree | 0e1c20fd075b638563f4569ca984a048c34c08b6 /src/soc/amd/mendocino/fch.c | |
parent | 956432cbb7f0a5a1618fb1111158cf3a8ede5f60 (diff) |
soc/amd/mendocino: Enable GPP clk req disabling for disabled devices
Enable GPP clk req disabling for disabled PCIe devices. If a clk req
line is enabled for a PCIe device that is not actually present and
enabled then the L1SS could get confused and cause issues with
suspending the SoC.
BUG=b:250009974
TEST=Ran on skyrim proto device, verified that clk reqs are set
appropriately
Change-Id: I6c840f2fa3f9358f58c0386134d23511ff880248
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68139
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/amd/mendocino/fch.c')
-rw-r--r-- | src/soc/amd/mendocino/fch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/amd/mendocino/fch.c b/src/soc/amd/mendocino/fch.c index e86cd318ce..5ebcc6b759 100644 --- a/src/soc/amd/mendocino/fch.c +++ b/src/soc/amd/mendocino/fch.c @@ -6,6 +6,7 @@ #include <amdblocks/acpimmio.h> #include <amdblocks/amd_pci_util.h> #include <amdblocks/gpio.h> +#include <amdblocks/pci_clk_req.h> #include <amdblocks/smi.h> #include <assert.h> #include <bootstate.h> @@ -130,7 +131,7 @@ static void fch_init_acpi_ports(void) /* configure the general purpose PCIe clock outputs according to the devicetree settings */ static void gpp_clk_setup(void) { - const struct soc_amd_mendocino_config *cfg = config_of_soc(); + struct soc_amd_mendocino_config *cfg = config_of_soc(); /* look-up table to be able to iterate over the PCIe clock output settings */ const uint8_t gpp_clk_shift_lut[GPP_CLK_OUTPUT_COUNT] = { @@ -145,6 +146,8 @@ static void gpp_clk_setup(void) uint32_t gpp_clk_ctl = misc_read32(GPP_CLK_CNTRL); + pcie_gpp_dxio_update_clk_req_config(&cfg->gpp_clk_config[0], + ARRAY_SIZE(cfg->gpp_clk_config)); for (int i = 0; i < GPP_CLK_OUTPUT_COUNT; i++) { gpp_clk_ctl &= ~GPP_CLK_REQ_MASK(gpp_clk_shift_lut[i]); /* |