summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2023-04-13 13:25:14 +0100
committerLean Sheng Tan <sheng.tan@9elements.com>2023-04-20 20:43:02 +0000
commit648ff9268fdcdef0045d75c66dddd84be60690f7 (patch)
tree47f5da6adb76dc27c9eaac7256b4de6c070e8810
parent5f0cda7e91f5aeba56442b90fbafbb1eb0b54930 (diff)
soc/intel/common/rtd3: Use D3COLD_SUPPORT to set max sleep state
Use D3COLD_SUPPORT Kconfig option to set the maximum support sleep state. 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: I578d4933b6144aec79fe0b2eb168338ef82c0b9d Reviewed-on: https://review.coreboot.org/c/coreboot/+/74406 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
-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 5067ac3f4e..8b372ed839 100644
--- a/src/soc/intel/common/block/pcie/rtd3/rtd3.c
+++ b/src/soc/intel/common/block/pcie/rtd3/rtd3.c
@@ -511,7 +511,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);