ec/google/chromeec/acpi/cros_ec: Ensure GpioInt and _PRW are mutually exclusive

Under Windows ACPI, GpioInt and _PRW must be mututally exclusive within
the scope of a device, otherwise a BSOD occurs with an ACPI_BIOS_ERROR.
To enforce this, only use _PRW when EC_ENABLE_SYNC_IRQ_GPIO is not set.
If both EC_ENABLE_WAKE_PIN and EC_ENABLE_SYNC_IRQ_GPIO are set, then
ensure that the GpioInt is flagged as ExclusiveAndWake (vs just
Exclusive) so that the CREC device is still able to wake the device
as needed.

TEST=Build/boot google/{nocturne,frostflow} to Win11 w/ sync_irq_gpio
and wake_pin both enabled.

Change-Id: Ia59cce2ee12bfc8d3ac0173a7a4ec88d7079a958
Signed-off-by: CoolStar <coolstarorganization@gmail.com>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82233
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
CoolStar 2024-05-03 02:44:59 -07:00 committed by Felix Held
parent c98ef0dd25
commit a48a3f3ef3

View File

@ -6,7 +6,11 @@ Device (CREC)
Name (_UID, 1)
Name (_DDN, "EC Command Device")
#ifdef EC_ENABLE_WAKE_PIN
#ifndef EC_ENABLE_SYNC_IRQ_GPIO
Name (_PRW, Package () { EC_ENABLE_WAKE_PIN, 0x5 })
#else
#define EC_SYNC_IRQ_WAKE_CAPABLE
#endif
#endif
#ifdef EC_SYNC_IRQ_WAKE_CAPABLE