summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/acpi/dptc.asl
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/common/acpi/dptc.asl')
-rw-r--r--src/soc/amd/common/acpi/dptc.asl25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/soc/amd/common/acpi/dptc.asl b/src/soc/amd/common/acpi/dptc.asl
new file mode 100644
index 0000000000..611024cb02
--- /dev/null
+++ b/src/soc/amd/common/acpi/dptc.asl
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+External(\_SB.DDEF, MethodObj)
+External(\_SB.DTAB, MethodObj)
+
+Scope (\_SB)
+{
+ Method (DPTC, 0, Serialized)
+ {
+ /* If _SB.DDEF is not present, DPTC is not enabled so return early. */
+ If (!CondRefOf (\_SB.DDEF))
+ {
+ Return (Zero)
+ }
+
+ If (CondRefOf (\_SB.DTAB) && (\_SB.PCI0.LPCB.EC0.TBMD == One))
+ {
+ \_SB.DTAB()
+ Return (Zero)
+ }
+
+ \_SB.DDEF()
+ Return (Zero)
+ }
+}