Cliff Huang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/72826 )
Change subject: src/soc/intel/common/block/pcie/rtd3: Fix root port _ON logic ......................................................................
src/soc/intel/common/block/pcie/rtd3: Fix root port _ON logic
_ON() calls _STA() at the beginning. If _STA() indicates the device is ON, it exits immediately. Before exiting, it needs to check if it was scheduled to be skipped first.
NOTE: RTD3 provides a way to skip _OFF() and _ON() methods following by a device reset such as WWAN device. When such device calls its _RST(), it increments OFSK. When the following _OFF() is called, it was scheduled to skip, it will aslo increments ONSK. Similiarly, when the following _ON() is called, it checks if the previous _OFF was skipped or not. If skipped, it needs to do the same. In normal suspend/resume cases, these two variables remains '0'. No _OFF() and _ON() calls are skipped.
BUG=b:241850118 TEST=Use above functions and check the generated SSDT table after OS boot.
Signed-off-by: Cliff Huang cliff.huang@intel.com Change-Id: Id1ea2e78e98d334a90294ee6cdd14ae2de9b9b62 --- M src/soc/intel/common/block/pcie/rtd3/rtd3.c 1 file changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/72826/1
diff --git a/src/soc/intel/common/block/pcie/rtd3/rtd3.c b/src/soc/intel/common/block/pcie/rtd3/rtd3.c index 8a67367..726d489 100644 --- a/src/soc/intel/common/block/pcie/rtd3/rtd3.c +++ b/src/soc/intel/common/block/pcie/rtd3/rtd3.c @@ -144,6 +144,12 @@ acpigen_emit_namestring(acpi_device_path_join(parent, "RTD3._STA")); acpigen_emit_byte(LOCAL0_OP); acpigen_write_if_lequal_op_int(LOCAL0_OP, ONE_OP); + if (config->skip_on_off_support) { + acpigen_write_if_lgreater_namestr_int("ONSK", 0); + acpigen_emit_byte(DECREMENT_OP); + acpigen_emit_namestring("ONSK"); + acpigen_write_if_end(); + } acpigen_write_return_op(ONE_OP); acpigen_write_if_end();