diff options
author | Josie Nordrum <JosieNordrum@google.com> | 2020-10-22 17:48:55 -0600 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-10-28 17:17:22 +0000 |
commit | 77f4b7fe0c0f1e0f09b1a69046b958c284cedeea (patch) | |
tree | 475d372f442e987fdbe4ac36c09ff97195e154a4 /src/soc | |
parent | 3603960d4d8836b1995edfad880d9b1471c10de1 (diff) |
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>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/acpi/platform.asl | 33 |
1 files changed, 33 insertions, 0 deletions
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() + } +} |