aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarun Tuli <taruntuli@google.com>2023-03-21 14:25:04 +0000
committerFelix Held <felix-coreboot@felixheld.de>2023-04-13 13:37:44 +0000
commita0353b573d3b6cc3bef20d2e01ddfbe09730ca27 (patch)
treea8fc25fc268b5f1fdabb98381215ec60439f691e
parent4877c1c0687b42799c9ab91ba9166cc4d82cb7c4 (diff)
mb/google/brya/acpi: Add support for GPS_REQUESTDXSTATE
Implement the GPS_REQUESTDXSTATE function which forces the current D notifier state to re-report. TEST=verified that notifications are forced out when invoked using acpiexec BUG=b:271938907 Signed-off-by: Tarun Tuli <taruntuli@google.com> Change-Id: I6dab9b793fe1d0b1c875eddbe6ae324d2894efe6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73890 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
-rw-r--r--src/mainboard/google/brya/acpi/gps.asl12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mainboard/google/brya/acpi/gps.asl b/src/mainboard/google/brya/acpi/gps.asl
index 36bccc1a98..f201037f06 100644
--- a/src/mainboard/google/brya/acpi/gps.asl
+++ b/src/mainboard/google/brya/acpi/gps.asl
@@ -4,11 +4,14 @@
#define GPS_FUNC_GETCALLBACKS 0x13
#define GPS_FUNC_PSHARESTATUS 0x20
#define GPS_FUNC_PSHAREPARAMS 0x2a
+#define GPS_FUNC_REQUESTDXSTATE 0x12
#define QUERY_GET_STATUS 0
#define QUERY_GET_SUPPORTED_FIELDS 1
#define QUERY_GET_CURRENT_LIMITS 2
+#define EC_D_NOTIFY_MASK 0x7
+
/* GPS return Package */
Name (GPSP, Buffer (0x28) {0x0})
CreateDWordField (GPSP, 0, RETN)
@@ -31,7 +34,8 @@ Method (GPS, 2, Serialized)
(1 << GPS_FUNC_SUPPORT) |
(1 << GPS_FUNC_GETCALLBACKS) |
(1 << GPS_FUNC_PSHARESTATUS) |
- (1 << GPS_FUNC_PSHAREPARAMS)))
+ (1 << GPS_FUNC_PSHAREPARAMS) |
+ (1 << GPS_FUNC_REQUESTDXSTATE)))
}
Case (GPS_FUNC_GETCALLBACKS)
{
@@ -88,6 +92,12 @@ Method (GPS, 2, Serialized)
}
}
}
+ Case (GPS_FUNC_REQUESTDXSTATE)
+ {
+ Local0 = ToInteger(\_SB.PCI0.LPCB.EC0.GPUD) & EC_D_NOTIFY_MASK
+ \_SB.PCI0.PEG0.PEGP.DNOT (Local0, 1)
+ Return (NV_ERROR_SUCCESS)
+ }
}
Return (NV_ERROR_UNSUPPORTED)