summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/acpi/dptc.asl
blob: 611024cb02fef9aef641ec98ecdd9c3097c3548d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)
    }
}