summaryrefslogtreecommitdiff
path: root/src/drivers/pcie
diff options
context:
space:
mode:
authorRobert Zieba <robertzieba@google.com>2022-07-12 13:19:17 -0600
committerMartin L Roth <gaumless@tutanota.com>2022-07-20 22:31:22 +0000
commitd1cc04b5eb5e418edce072e4950b4d9247de93a3 (patch)
tree6e14028e3cfefeb8ea117f1f66a83f57546407eb /src/drivers/pcie
parent23e94a4e2353162eb19a26626e197c6dcd1f8df5 (diff)
drivers/pci/generic: Add support for `_PRW`
This commit adds support for `_PRW` in this driver. BUG=b:237682766 TEST=Built and booted on Skyrim device, dumped SSDT Change-Id: Ife4ba48994cbf993bc88df8354576336438e4258 Signed-off-by: Robert Zieba <robertzieba@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65799 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/pcie')
-rw-r--r--src/drivers/pcie/generic/chip.h2
-rw-r--r--src/drivers/pcie/generic/generic.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/pcie/generic/chip.h b/src/drivers/pcie/generic/chip.h
index e5b2876766..78285b9693 100644
--- a/src/drivers/pcie/generic/chip.h
+++ b/src/drivers/pcie/generic/chip.h
@@ -7,6 +7,8 @@
struct drivers_pcie_generic_config {
const char *name;
+ unsigned int wake_gpe;
+ unsigned int wake_deepest;
};
#endif /* _PCIE_GENERIC_H_ */
diff --git a/src/drivers/pcie/generic/generic.c b/src/drivers/pcie/generic/generic.c
index a26c37b543..8b073405fd 100644
--- a/src/drivers/pcie/generic/generic.c
+++ b/src/drivers/pcie/generic/generic.c
@@ -40,6 +40,9 @@ static void pcie_generic_fill_ssdt(const struct device *dev)
acpigen_write_device(name);
acpigen_write_ADR_pci_device(dev);
+ if (config->wake_gpe)
+ acpigen_write_PRW(config->wake_gpe, config->wake_deepest);
+
acpigen_write_device_end();
acpigen_write_scope_end();