Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46669 )
Change subject: soc/amd/common/acpi: Create platform.asl to define acpi transitions ......................................................................
soc/amd/common/acpi: Create platform.asl to define acpi transitions
Define device _WAK, _PTS, and _INI acpi methods with callbacks into mainboard methods if provided.
BUG=b:158087989 BRANCH=Zork TEST=tested backlight during reboot and suspend
Signed-off-by: Josie Nordrum josienordrum@google.com Change-Id: I8020173a15db1d310459d5c1de3600949b173b00 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46669 Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- A src/soc/amd/common/acpi/platform.asl 1 file changed, 33 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/soc/amd/common/acpi/platform.asl b/src/soc/amd/common/acpi/platform.asl new file mode 100644 index 0000000..6db12e3 --- /dev/null +++ b/src/soc/amd/common/acpi/platform.asl @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* Callback methods to be implemented by mainboard */ +External(_SB.MPTS, MethodObj) +External(_SB.MWAK, MethodObj) +External(_SB.MINI, MethodObj) + +Scope (_SB){ + /* Platform initialization methods */ + Method (_INI, 0, NotSerialized) + { + If (CondRefOf (_SB.MINI)) { + _SB.MINI() + } + } +} + +/* Platform-wide wake methods */ +Method (_WAK, 1, NotSerialized) +{ + If (CondRefOf (_SB.MWAK)) { + _SB.MWAK() + } + Return (Package (){ 0, 0 }) +} + +/* Platform-wide Put To Sleep (suspend) methods */ +Method (_PTS, 1, NotSerialized) +{ + If (CondRefOf (_SB.MPTS)) { + _SB.MPTS() + } +}