From ac2cb4262104ffb2dac229f061480df4a29d8064 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Fri, 21 May 2021 16:46:49 -0700 Subject: soc/intel/tigerlake: Return TBT PowerResource from PR0 and PR3 TBT PowerResource _ON/_OFF methods are currently invoked by _PS0 and _PS3 respectively. It is defined for ACPI driver to call _ON and _OFF methods. This change drops the _PS0 and _PS3 call for _ON/_OFF and returns TBT PowerResource declaration in the _PR0 and _PR3, then ACPI driver will call the TBT PowerResource _ON and _OFF methods. BUG=b:188891878 TEST=Traced both of TBT _ON and _OFF methods invocation and execution at run time. Verified TBT's power_state to be D3Cold. Signed-off-by: John Zhao Change-Id: I398b3f58ec89f98673cbbe633149d31188ec3351 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54812 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/tigerlake/acpi/tcss_dma.asl | 22 ++++++++++------------ src/soc/intel/tigerlake/acpi/tcss_pcierp.asl | 12 ++++++++++-- 2 files changed, 20 insertions(+), 14 deletions(-) (limited to 'src/soc/intel/tigerlake/acpi') diff --git a/src/soc/intel/tigerlake/acpi/tcss_dma.asl b/src/soc/intel/tigerlake/acpi/tcss_dma.asl index 085990dbfd..273a71ec48 100644 --- a/src/soc/intel/tigerlake/acpi/tcss_dma.asl +++ b/src/soc/intel/tigerlake/acpi/tcss_dma.asl @@ -32,12 +32,20 @@ Method (_S0W, 0x0) Method (_PR0) { - Return (Package() { \_SB.PCI0.D3C }) + If (DUID == 0) { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT0 }) + } Else { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT1 }) + } } Method (_PR3) { - Return (Package() { \_SB.PCI0.D3C }) + If (DUID == 0) { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT0 }) + } Else { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT1 }) + } } /* @@ -66,20 +74,10 @@ Name (SD3C, 0) Method (_PS0, 0, Serialized) { - If (DUID == 0) { - \_SB.PCI0.TBT0._ON() - } Else { - \_SB.PCI0.TBT1._ON() - } } Method (_PS3, 0, Serialized) { - If (DUID == 0) { - \_SB.PCI0.TBT0._OFF() - } Else { - \_SB.PCI0.TBT1._OFF() - } } Method (_DSW, 3) diff --git a/src/soc/intel/tigerlake/acpi/tcss_pcierp.asl b/src/soc/intel/tigerlake/acpi/tcss_pcierp.asl index 0453f1c7d4..847d87ea6e 100644 --- a/src/soc/intel/tigerlake/acpi/tcss_pcierp.asl +++ b/src/soc/intel/tigerlake/acpi/tcss_pcierp.asl @@ -213,12 +213,20 @@ Method (_S0W, 0x0, NotSerialized) Method (_PR0) { - Return (Package() { \_SB.PCI0.D3C }) + If ((TUID == 0) || (TUID == 1)) { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT0 }) + } Else { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT1 }) + } } Method (_PR3) { - Return (Package() { \_SB.PCI0.D3C }) + If ((TUID == 0) || (TUID == 1)) { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT0 }) + } Else { + Return (Package() { \_SB.PCI0.D3C, \_SB.PCI0.TBT1 }) + } } /* -- cgit v1.2.3