soc/mediatek/common: Fix wrong write API for protect_key_setting
[coreboot.git] / src / soc / intel / common / acpi / platform.asl
blob8afb6ff517df9c852da16741ceea7db07cdcefae
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <commonlib/include/commonlib/console/post_codes.h>
5 External(\_SB.MPTS, MethodObj)
6 External(\_SB.MWAK, MethodObj)
7 External(\_SB.PCI0.EGPM, MethodObj)
8 External(\_SB.PCI0.RGPM, MethodObj)
9 External(\_SB.PCI0.LPCB.EC0.PTS, MethodObj)
10 External(\_SB.PCI0.LPCB.EC0.WAK, MethodObj)
12 #include <arch/x86/acpi/post.asl>
15  * The _PTS method (Prepare To Sleep) is called before the OS is
16  * entering a sleep state. The sleep state number is passed in Arg0
17  */
19 Method (_PTS, 1)
21         DBG0 = POSTCODE_OS_ENTER_PTS
23         If (CondRefOf (\_SB.PCI0.LPCB.EC0.PTS))
24         {
25                 \_SB.PCI0.LPCB.EC0.PTS (Arg0)
26         }
27         If (CondRefOf (\_SB.MPTS))
28         {
29                 \_SB.MPTS (Arg0)
30         }
31         /*
32          * Save the current PM bits then
33          * enable GPIO PM with MISCCFG_GPIO_PM_CONFIG_BITS
34          */
35         If (CondRefOf (\_SB.PCI0.EGPM))
36         {
37                 \_SB.PCI0.EGPM ()
38         }
41 /* The _WAK method is called on system wakeup */
43 Method (_WAK, 1)
45         DBG0 = POSTCODE_OS_ENTER_WAKE
47         If (CondRefOf (\_SB.PCI0.LPCB.EC0.WAK))
48         {
49                 \_SB.PCI0.LPCB.EC0.WAK (Arg0)
50         }
51         If (CondRefOf (\_SB.MWAK))
52         {
53                 \_SB.MWAK (Arg0)
54         }
55         /* Restore GPIO all Community PM */
56         If (CondRefOf (\_SB.PCI0.RGPM))
57         {
58                 \_SB.PCI0.RGPM ()
59         }
61         Return (Package(){0,0})