From dbb97c3243e55a0fd00e692d150c9d38d09b57af Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Fri, 3 Feb 2023 16:38:10 +0000 Subject: [PATCH] soc/intel/rtd3: Hook up supported states to Kconfig Report `4` in `_S0W` only when D3COLD_SUPPORT is enabled, as if it is not, it will break S3 exit. When D3COLD_SUPPORT is not enabled, return `3` (D3Hot). This fixed S3 exit on both TGL and ADL. Tested on StarBook Mk V and Mk VI. Signed-off-by: Sean Rhodes Change-Id: I3a4b89132b594ad568a5851137575f921f8e2a2e Reviewed-on: https://review.coreboot.org/c/coreboot/+/72765 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- src/soc/intel/common/block/pcie/rtd3/rtd3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/soc/intel/common/block/pcie/rtd3/rtd3.c b/src/soc/intel/common/block/pcie/rtd3/rtd3.c index 2224810228..1519e6fd50 100644 --- a/src/soc/intel/common/block/pcie/rtd3/rtd3.c +++ b/src/soc/intel/common/block/pcie/rtd3/rtd3.c @@ -490,7 +490,10 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev) acpigen_write_device(acpi_device_name(dev)); acpigen_write_ADR(0); acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON); - acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D3_COLD); + if (CONFIG(D3COLD_SUPPORT)) + acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D3_COLD); + else + acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D3_HOT); acpi_device_add_storage_d3_enable(NULL);