From 086f0faf756a2d4e71fd9c1d27335af240418b19 Mon Sep 17 00:00:00 2001 From: Eric Lai Date: Fri, 13 Dec 2019 12:31:46 +0800 Subject: soc/intel/cannonlake: Move GPIO PM configuration to soc level Enable GPIO clock gating when enter s0ix/Sx and save the PM bits. Restore the PM bits when exit s0ix/Sx. BUG=b:144002424 TEST=Check GPIO PM bits when enter/exit s0ix are expected Signed-off-by: Eric Lai Change-Id: I120f8369b8d3cf7ac821332bdfa124f6ed0570e9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/37685 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/intel/common/acpi/platform.asl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/acpi/platform.asl b/src/soc/intel/common/acpi/platform.asl index 9aa2edc6df..c41ccbe0cb 100644 --- a/src/soc/intel/common/acpi/platform.asl +++ b/src/soc/intel/common/acpi/platform.asl @@ -19,6 +19,8 @@ External(\_SB.MPTS, MethodObj) External(\_SB.MWAK, MethodObj) +External(\_SB.PCI0.EGPM, MethodObj) +External(\_SB.PCI0.RGPM, MethodObj) /* Port 80 POST */ @@ -41,6 +43,14 @@ Method (_PTS, 1) { \_SB.MPTS (Arg0) } + /* + * Save the current PM bits then + * enable GPIO PM with MISCCFG_ENABLE_GPIO_PM_CONFIG + */ + If (CondRefOf (\_SB.PCI0.EGPM)) + { + \_SB.PCI0.EGPM () + } } /* The _WAK method is called on system wakeup */ @@ -53,6 +63,11 @@ Method (_WAK, 1) { \_SB.MWAK (Arg0) } + /* Restore GPIO all Community PM */ + If (CondRefOf (\_SB.PCI0.RGPM)) + { + \_SB.PCI0.RGPM () + } Return (Package(){0,0}) } -- cgit v1.2.3