summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/pcie/rtd3
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2023-02-03 16:38:10 +0000
committerLean Sheng Tan <sheng.tan@9elements.com>2023-02-20 10:14:38 +0000
commitdbb97c3243e55a0fd00e692d150c9d38d09b57af (patch)
tree9baa4b82c7075c6c374c7b3897b47166ef29c5f9 /src/soc/intel/common/block/pcie/rtd3
parent18545009407b1ec0e731f24ca4c16dbc967864b3 (diff)
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 <sean@starlabs.systems> Change-Id: I3a4b89132b594ad568a5851137575f921f8e2a2e Reviewed-on: https://review.coreboot.org/c/coreboot/+/72765 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/soc/intel/common/block/pcie/rtd3')
-rw-r--r--src/soc/intel/common/block/pcie/rtd3/rtd3.c5
1 files changed, 4 insertions, 1 deletions
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);