From 77f4b7fe0c0f1e0f09b1a69046b958c284cedeea Mon Sep 17 00:00:00 2001 From: Josie Nordrum Date: Thu, 22 Oct 2020 17:48:55 -0600 Subject: 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 Change-Id: I8020173a15db1d310459d5c1de3600949b173b00 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46669 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/amd/common/acpi/platform.asl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/soc/amd/common/acpi/platform.asl (limited to 'src') diff --git a/src/soc/amd/common/acpi/platform.asl b/src/soc/amd/common/acpi/platform.asl new file mode 100644 index 0000000000..6db12e3d47 --- /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() + } +} -- cgit v1.2.3